diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-07-22 20:40:44 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-07-22 20:40:44 -0400 |
| commit | b3fe1f7fae9465bb3d53302880d5ba8f039faa16 (patch) | |
| tree | 796817acdfbd0322e4cb5177fe5b6281483813e5 /bot.js | |
| parent | 6a1e54ffbb3668854103d3296a553aaca9c8d355 (diff) | |
| download | DLAP-b3fe1f7fae9465bb3d53302880d5ba8f039faa16.tar.gz DLAP-b3fe1f7fae9465bb3d53302880d5ba8f039faa16.tar.bz2 DLAP-b3fe1f7fae9465bb3d53302880d5ba8f039faa16.zip | |
Ready and stop embed
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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(); |
