This commit is contained in:
Emily 2020-04-29 21:21:34 +10:00
parent a31dc02568
commit 5c6938369d
8 changed files with 31 additions and 25 deletions

View file

@ -32,20 +32,16 @@ module.exports.run = (client, message, args, level) => {
var input = +args[0]
if (isNaN(input) === true) {
return message.channel.send('That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
return message.channel.send('<:error:466995152976871434> That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
}
if (input >= queue.length) {
return message.channel.send('Invalid (too large)')
}
if (input < 1) {
return message.channel.send('Invalid (too small)')
if (input >= queue.length || input < 1) {
return message.channel.send('<:error:466995152976871434> Input is not a valid song ID.')
}
var songName = queue[input].video.title
queue.splice(input, 1)
message.channel.send(`Removed from queue: **${songName}**`)
message.channel.send(`<:success:466995111885144095> Removed from queue: **${songName}**`)
}