27 lines
		
	
	
		
			820 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			820 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 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); |