added comments
This commit is contained in:
@@ -6,8 +6,10 @@ import { registerCommands } from './discord';
|
||||
import { createQueue, joinQueue, leaveQueue, queueInfo, readyQueue } from './queue';
|
||||
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||||
|
||||
//init logs with a timestamp
|
||||
console.log(new Date().toISOString()+'\n\n');
|
||||
|
||||
//get token
|
||||
if (!fs.existsSync('./token')) {
|
||||
fs.writeFileSync('./token', '');
|
||||
console.error('Missing Discord Token, please enter the bot token into the token file');
|
||||
@@ -15,6 +17,7 @@ if (!fs.existsSync('./token')) {
|
||||
}
|
||||
const TOKEN = fs.readFileSync('./token').toString();
|
||||
|
||||
//discord connections
|
||||
CLIENT.on('ready', client => {
|
||||
console.log(`Logged in as ${client.user.tag}`);
|
||||
client.guilds.fetch().then(guilds =>
|
||||
|
||||
Reference in New Issue
Block a user