From b3fe1f7fae9465bb3d53302880d5ba8f039faa16 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 22 Jul 2020 20:40:44 -0400 Subject: Ready and stop embed --- bot.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bot.js b/bot.js index d8359bc..865b04f 100644 --- a/bot.js +++ b/bot.js @@ -78,6 +78,14 @@ bot.on('ready', () => { console.log(`Voice Channel: ${config.voiceChannel}`); console.log(`Status Channel: ${config.statusChannel}\n`); + const readyEmbed = new Discord.MessageEmbed() + .setTitle(bot.user.username) + .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(readyEmbed); bot.user.setStatus('online'); console.log('Connected to the voice channel.'); playAudio(); @@ -159,10 +167,11 @@ bot.on('message', async msg => { if (command == 'stop') { await msg.reply('Powering off...'); const statusEmbed = new Discord.MessageEmbed() - .setTitle('That\'s all folks!') + .setTitle(bot.user.username) + .setDescription('That\'s all folks!') .setColor('#0066ff') let statusChannel = bot.channels.cache.get(config.statusChannel); - if (!statusChannel) return console.error('The status channel does not exist! Skipping.'); + if (!statusChannel) return console.error('The status channel does not exist! Skipping.'); await statusChannel.send(statusEmbed); console.log('Powering off...'); dispatcher.destroy(); -- cgit v1.2.3