Files
gestion-perso/fonctions/run.ts
T
2024-02-26 11:20:08 +01:00

15 lines
524 B
TypeScript

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);
};