diff options
Diffstat (limited to 'src/commands/voice/skipto.ts')
| -rw-r--r-- | src/commands/voice/skipto.ts | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/commands/voice/skipto.ts b/src/commands/voice/skipto.ts deleted file mode 100644 index ee4a7ba..0000000 --- a/src/commands/voice/skipto.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -//@ts-ignore -import emoji from 'emoji-random'; - -module.exports = class SkipToVoice extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'skipto', - group: 'voice', - memberName: 'skipto', - description: 'Skip to a certain song in the current queue.', - guildOnly: true, - args: [{ - key: 'songNumber', - prompt: 'What song would you like to skip to in the current queue?', - type: 'integer' - }], - examples: ['uwu!skipto 5'], - clientPermissions: ['SPEAK', 'CONNECT', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - }); - } - //@ts-ignore - 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 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 - if (msg.guild.musicData.queue < 1) - return msg.reply('There aren\'t any songs in the current queue. ' + emoji.random()); - - //@ts-ignore - msg.guild.musicData.queue.splice(0, songNumber - 1); - //@ts-ignore - msg.guild.musicData.songDispatcher.end(); - return; - } -};
\ No newline at end of file |