From 3d391a685a5e63dcec974d2266babdb62365b861 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Tue, 19 Nov 2019 18:08:00 +0200 Subject: [PATCH] playlist patch --- commands/playlist/delete.js | 11 +++++++++++ commands/playlist/remove.js | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 commands/playlist/delete.js diff --git a/commands/playlist/delete.js b/commands/playlist/delete.js new file mode 100644 index 00000000..c18fbec1 --- /dev/null +++ b/commands/playlist/delete.js @@ -0,0 +1,11 @@ +module.exports = { + name: 'setpremium', + async execute(message, args, client, Discord, prefix) { + client.global.db.playlists[message.guild.id] = { + songs: [], + firstSong: undefined, + saved: false, + }; + message.channel.send(':white_check_mark: This guild is now premium! :tada:') + } +}; \ No newline at end of file diff --git a/commands/playlist/remove.js b/commands/playlist/remove.js index d69f4ca9..92a04f03 100644 --- a/commands/playlist/remove.js +++ b/commands/playlist/remove.js @@ -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);