bot passer sous TS

This commit is contained in:
Tutur33
2024-02-25 19:15:42 +01:00
parent d85c18f7ed
commit 1f86194f64
16 changed files with 221 additions and 120 deletions
+15
View File
@@ -0,0 +1,15 @@
const { Client, IntentsBitField, Collection } = require('discord.js')
const loadEvents = require("./loadEvents");
const loadCommands = require("./loadCommands");
module.exports = function run(token: string) {
const client = new Client({intents: new IntentsBitField(3276799)});
client.events = new Collection();
client.commands = new Collection();
console.log(`${loadEvents(client, 'events')} events loaded`);
console.log(`${loadCommands(client, 'commands')} commands loaded`);
client.login(token);
};