audit fix; add n. guilds stat

This commit is contained in:
Yusur 2025-08-19 17:00:01 +02:00
parent c6d37cd81e
commit a6ea1188b8
7 changed files with 217 additions and 157 deletions

View file

@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import "./initConfig";
import init from "./initConfig";
import commandList from "./commandList";
import { REST, Routes } from 'discord.js';
init();
function registerGlobal(rest: REST, clientId: string, commands: any){
rest.put(Routes.applicationCommands(clientId), { body: commands })
.then(() => { console.log(`Successfully registered ${commands.length} / commands globally. Please wait until 2 hours before they are updated`); })
@ -52,4 +54,5 @@ if (guilds.length === 0){
registerGlobal(rest, clientId, commands);
} else {
registerLocal(rest, clientId, commands, guilds);
}
}