aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-03-29 20:41:38 -0400
committerAndrew Lee <alee14498@protonmail.com>2022-03-29 20:41:38 -0400
commitfd89e36490da711ba611c1f7c8dda93a3de054f0 (patch)
treee8c1114add718665c75bb90e7af90a9f38101815 /bot.js
parent84b7017c7016aea12339ec4a3ef2ba1bf0fb3872 (diff)
downloadDLAP-fd89e36490da711ba611c1f7c8dda93a3de054f0.tar.gz
DLAP-fd89e36490da711ba611c1f7c8dda93a3de054f0.tar.bz2
DLAP-fd89e36490da711ba611c1f7c8dda93a3de054f0.zip
New command; Every Discord interation is async
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js12
1 files changed, 6 insertions, 6 deletions
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);
});