aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-20 20:17:40 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-20 20:17:40 -0400
commit354a658cc3ec8c8c15232c70eb348a9bc73f95a0 (patch)
treeedfa44fbf3b370831f57b43db8246539ead12109 /bot.js
parentf352357df92d7d74a1c3e3bab79f24634dff8d32 (diff)
downloadDLAP-354a658cc3ec8c8c15232c70eb348a9bc73f95a0.tar.gz
DLAP-354a658cc3ec8c8c15232c70eb348a9bc73f95a0.tar.bz2
DLAP-354a658cc3ec8c8c15232c70eb348a9bc73f95a0.zip
Made the status channel customizable
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js5
1 files changed, 3 insertions, 2 deletions
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);