18 lines
588 B
JavaScript
18 lines
588 B
JavaScript
module.exports = {
|
|
name: 'remove',
|
|
aliases: ['remove', 'rm'],
|
|
utilisation: `{prefix}remove <id>`,
|
|
voiceChannel: true,
|
|
|
|
execute(client, message, args) {
|
|
const queue = player.getQueue(message.guild.id);
|
|
if (!queue || !args[1]) return;
|
|
const trackIndex = args[1] - 1;
|
|
if(!queue.tracks[trackIndex]) return;
|
|
const trackName = queue.tracks[trackIndex].title;
|
|
//const trackUrl = queue.tracks[trackIndex].url;
|
|
queue.remove(trackIndex);
|
|
|
|
message.reply(`It's good, ${trackName} removed ! :white_check_mark:`)
|
|
},
|
|
}; |