summaryrefslogtreecommitdiff
path: root/src/commands/voice/remove.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-23 23:24:17 -0700
committer8cy <[email protected]>2020-07-23 23:24:17 -0700
commitbb511abc03bb66848947e37a999502b813c77269 (patch)
tree612c010fc8317e1cdf11471a18aad0270819d33e /src/commands/voice/remove.ts
parentfix: if clear amount equal or over 100, round down to 99 (diff)
downloaddep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz
dep-core-bb511abc03bb66848947e37a999502b813c77269.zip
goodbye old uwufier :cry:
Diffstat (limited to 'src/commands/voice/remove.ts')
-rw-r--r--src/commands/voice/remove.ts48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/commands/voice/remove.ts b/src/commands/voice/remove.ts
deleted file mode 100644
index 993a368..0000000
--- a/src/commands/voice/remove.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
-//@ts-ignore
-import emoji from 'emoji-random';
-
-module.exports = class RemoveVoice extends Command {
- constructor(client: CommandoClient) {
- super(client, {
- name: 'remove',
- group: 'voice',
- memberName: 'remove',
- description: 'Removes a song from the current queue.',
- guildOnly: true,
- args: [
- {
- key: 'songNumber',
- prompt: 'What song would you like to remove from the current queue?',
- type: 'integer'
- }
- ],
- examples: ['uwu!remove 2'],
- clientPermissions: ['SPEAK', 'CONNECT', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
- userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
- throttling: {
- usages: 5,
- duration: 30
- },
- });
- }
- run(msg: CommandoMessage, { songNumber }: any) {
- //@ts-ignore
- if (songNumber < 1 && songNumber >= msg.guild.musicData.queue.length) {
- return msg.reply('Please enter a valid song. ' + emoji.random());
- }
- var voiceChannel = msg.member.voice.channel;
- if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
-
- //@ts-ignore
- if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- //@ts-ignore
- msg.guild.musicData.songDispatcher == null) {
- return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
- }
-
- //@ts-ignore
- msg.guild.musicData.queue.splice(songNumber - 1, 1);
- return msg.say(`Removed song **#${songNumber}** from current queue. ` + emoji.random());
- }
-}; \ No newline at end of file