1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 15:46:00 +00:00

playlist patch

This commit is contained in:
MatteZ02
2019-11-19 18:08:00 +02:00
parent 698bb0eb9b
commit 3d391a685a
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,6 @@ module.exports = {
if (!args[2]) return message.channel.send(':x: Please provide a number on the position of the song that you wan\'t to remove!');
const songNum = parseInt(args[2]) - 1;
if (isNaN(songNum)) return message.channel.send(':x: You need to enter a __number__!');
if (songNum === 0) return message.channel.send(':x: You can not remove the currently playing song!');
if (parseInt(songNum) > client.global.db.playlists[message.guild.id].songs.size) return message.channel.send(`:x: There is only ${serverQueue.songs.size} amount of songs in the queue!`);
message.channel.send(`🗑️ removed \`${client.global.db.playlists[message.guild.id].songs[songNum].title}\` from the playlist!`);
return client.global.db.playlists[message.guild.id].songs.splice(songNum, 1);