From 354a658cc3ec8c8c15232c70eb348a9bc73f95a0 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Jul 2020 20:17:40 -0400 Subject: Made the status channel customizable --- bot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index b8c07af..cb458c4 100644 --- a/bot.js +++ b/bot.js @@ -34,8 +34,9 @@ function playAudio() { dispatcher.on('start', () => { console.log('Now playing ' + audio); - let serviceChannel = client.channels.cache.get('606602551634296968'); - serviceChannel.send('**Project Jul-2020 Bot:**\nNow playing ' + audio); + let statusChannel = client.channels.cache.get(config.statusChannel); + if (!statusChannel) return console.error('The channel does not exist!'); + statusChannel.send('**Project Jul-2020 Bot:**\nNow playing ' + audio); }); dispatcher.on('error', console.error); -- cgit v1.2.3