aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-21 15:44:14 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-21 15:44:14 -0400
commit4ca58b27c9a0caebfa7b27a0bfe9dd0db8d5a5fc (patch)
treea6a0d18f3d71d03f72ab52d199e50a1580aa4ea7
parent804f26da63d7c400732a77163cd80e5c8c5bbcef (diff)
downloadDLAP-4ca58b27c9a0caebfa7b27a0bfe9dd0db8d5a5fc.tar.gz
DLAP-4ca58b27c9a0caebfa7b27a0bfe9dd0db8d5a5fc.tar.bz2
DLAP-4ca58b27c9a0caebfa7b27a0bfe9dd0db8d5a5fc.zip
Changed the error messages
-rw-r--r--README.md2
-rw-r--r--bot.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 2654ecb..b593567 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# DLMP3 Bot (Discord Local MP3)
+# DLMP3 Bot (Discord.JS Local MP3)
A Discord bot that plays local mp3 audio tracks. Written in Discord.JS.
[Video Tutorial](https://www.youtube.com/watch?v=7X3FAhYW31I)
diff --git a/bot.js b/bot.js
index b3cdd6e..8f534c9 100644
--- a/bot.js
+++ b/bot.js
@@ -29,7 +29,7 @@ client.login(config.token);
function playAudio() {
const channel = client.channels.cache.get(config.voiceChannel);
- if (!channel) return console.error('The channel does not exist!');
+ if (!channel) return console.error('The voice channel does not exist!\n(Have you looked at your configuration?)');
channel.join().then(connection => {
let files = fs.readdirSync('./music');
@@ -50,7 +50,7 @@ function playAudio() {
.addField('Now Playing', `${audio}`)
.setColor('#0066ff')
let statusChannel = client.channels.cache.get(config.statusChannel);
- if (!statusChannel) return console.error('The channel does not exist!');
+ if (!statusChannel) return console.error('The status channel does not exist! Skipping.');
statusChannel.send(statusEmbed);
});
@@ -128,7 +128,7 @@ client.on('message', async msg => {
if (command == 'leave') {
const channel = client.channels.cache.get(config.voiceChannel);
- if (!channel) return console.error('The channel does not exist!');
+ if (!channel) return console.error('The voice channel does not exist!\n(Have you looked at your configuration?)');
msg.reply('Leaving voice channel.');
console.log('Leaving voice channel.');
dispatcher.destroy();