-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathremove.js
More file actions
18 lines (17 loc) · 649 Bytes
/
remove.js
File metadata and controls
18 lines (17 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const { CommandBuilder } = require("../Commands.js");
module.exports = {
command: new CommandBuilder()
.setName("remove")
.setDescription("Remove a specific song from the queue.", "commands.remove")
.addNumberOption(opt =>
opt.setName("index")
.setDescription("The position of the song in the queue. You can view the indices with the 'list' command", "options.remove.index")
.setRequired(true)
),
run: async function(message, data) {
const p = await this.getPlayer(message);
if (!p) return;
let res = p.remove(data.options[0].value);
message.channel.sendEmbed(res);
}
}