diff --git a/package.json b/package.json index bb0b2ffc..b12d9762 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "musix", - "version": "3.10.1", + "version": "3.10.2", "description": "V3 for Musix the discord music bot", "main": "./index.js", "scripts": { @@ -48,4 +48,4 @@ "ytsr": "^0.1.15", "zlib-sync": "^0.1.7" } -} \ No newline at end of file +} diff --git a/src/struct/config/messages.js b/src/struct/config/messages.js index 93a316a6..1f891a51 100644 --- a/src/struct/config/messages.js +++ b/src/struct/config/messages.js @@ -192,6 +192,7 @@ module.exports = { stop: emojis.stop + "Stopped the music!", tookTooLong: emojis.redx + "Something took too long! Please try again!", validNumber: emojis.redx + "I'm sorry, But you need to enter a valid __number__.", + videoUnavailable: emojis.redx + "That video is unavaiable! Please try again.", wrongVoiceChannel: emojis.redx + "I'm sorry but you need to be in the same voice channel as Musix to use this command!", }; \ No newline at end of file diff --git a/src/struct/funcs/play.js b/src/struct/funcs/play.js index ced6f416..cc5c8d4f 100644 --- a/src/struct/funcs/play.js +++ b/src/struct/funcs/play.js @@ -31,7 +31,12 @@ module.exports = async function (guild, song, client, seek, play) { if (song.type === "ytdl" || song.type === "spotify") input = ytdl(song.url, streamConfig.ytdlOptions) //.on('info', (info, format) => console.log(format)) - .on("error", (error) => console.log(error)); + .on("error", (error) => { + console.log(error) + queue.voiceChannel.leave(); + client.queue.delete(guild.id); + queue.textChannel.send(client.messages.videoUnavailable) + }); const ffmpegArgs = [ "-analyzeduration",