mirror of
https://github.com/Alee14/DLAP.git
synced 2025-01-22 19:02:57 -05:00
Changed the error messages
This commit is contained in:
parent
804f26da63
commit
4ca58b27c9
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
6
bot.js
6
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();
|
||||
|
|
Loading…
Reference in a new issue