diff options
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | bot.js | 5 |
2 files changed, 5 insertions, 3 deletions
@@ -10,7 +10,8 @@ Make a new file called `config.json` "token": "token_here", "prefix": "!", "voiceChannel": "voice_channel_id", - "botOwner": "your_user_id_here" + "botOwner": "your_user_id_here", + "statusChannel": "channel_id" } ``` @@ -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); |
