From fd89e36490da711ba611c1f7c8dda93a3de054f0 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 29 Mar 2022 20:41:38 -0400 Subject: New command; Every Discord interation is async --- bot.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index f0a9c63..6978ea7 100644 --- a/bot.js +++ b/bot.js @@ -45,7 +45,7 @@ for (const file of commandFiles) { bot.commands.set(command.data.name, command); } -bot.once('ready', () => { +bot.once('ready', async () => { console.log('Bot is ready!'); console.log(`Logged in as ${bot.user.tag}!`); console.log(`Running on Discord.JS ${version}`) @@ -67,15 +67,15 @@ bot.once('ready', () => { // Send bots' status to channel const readyEmbed = new MessageEmbed() - .setAuthor({ name: bot.user.username, iconURL: bot.user.avatarURL()} ) - .setDescription('Starting bot...') - .setColor('#0066ff') + .setAuthor({name: bot.user.username, iconURL: bot.user.avatarURL()}) + .setDescription('Starting bot...') + .setColor('#0066ff') let statusChannel = bot.channels.cache.get(config.statusChannel); if (!statusChannel) return console.error('The status channel does not exist! Skipping.'); - statusChannel.send({ embeds: [readyEmbed]}); + await statusChannel.send({embeds: [readyEmbed]}); - voiceInit(bot); + await voiceInit(bot); }); -- cgit v1.2.3