Lanbot_Music_V12/main.js

27 lines
820 B
JavaScript
Raw Normal View History

2022-01-04 02:35:59 +01:00
const { Client, Collection } = require('discord.js');
const { loadCommands, loadEvents } = require("./util/loader");
const client = new Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] });
require("./util/functions")(client);
client.config = require("./config");
client.mongoose = require("./util/mongoose");
client.queue = new Map();
//correspond à client.commands, client.cooldowns
["commands", "cooldowns", "category", "name"].forEach(x => client[x] = new Collection());
/* TODO ligne exécution commande DEBUG !!!!
const message = ("say")
const settings = client.getGuild(message.guild);
module.exports.run(client, message, "hello", settings); */
loadCommands(client);
loadEvents(client);
client.mongoose.init();
//lien vers le token du bot
client.login(client.config.TOKEN);