aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-22 20:40:44 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-22 20:40:44 -0400
commitb3fe1f7fae9465bb3d53302880d5ba8f039faa16 (patch)
tree796817acdfbd0322e4cb5177fe5b6281483813e5 /bot.js
parent6a1e54ffbb3668854103d3296a553aaca9c8d355 (diff)
downloadDLAP-b3fe1f7fae9465bb3d53302880d5ba8f039faa16.tar.gz
DLAP-b3fe1f7fae9465bb3d53302880d5ba8f039faa16.tar.bz2
DLAP-b3fe1f7fae9465bb3d53302880d5ba8f039faa16.zip
Ready and stop embed
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js13
1 files 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();