From 385b0960abdc8bb13172330a973dafd56560cf8d Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Tue, 7 Jul 2020 03:55:21 -0700 Subject: big cool :star: - add commenting to bot.ts - add types to most of the voice commands - add art and verify cmd for emma - add roastwilly cmd - fix rp cmd formatting --- src/commands/voice/skipall.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/commands/voice/skipall.ts') diff --git a/src/commands/voice/skipall.ts b/src/commands/voice/skipall.ts index 7d8b113..c7e0333 100644 --- a/src/commands/voice/skipall.ts +++ b/src/commands/voice/skipall.ts @@ -1,8 +1,9 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; +import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; +//@ts-ignore import emoji from 'emoji-random'; module.exports = class SkipAllVoice extends Command { - constructor(client) { + constructor(client: CommandoClient) { super(client, { name: 'skipall', aliases: [ @@ -29,19 +30,23 @@ module.exports = class SkipAllVoice extends Command { }, }); } + //@ts-ignore run(msg: CommandoMessage) { var voiceChannel = msg.member.voice.channel; if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random()); - if ( - typeof msg.guild.musicData.songDispatcher == 'undefined' || - msg.guild.musicData.songDispatcher == null - ) { + //@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) return msg.say('There aren\'t any songs in the current queue. ' + emoji.random()); + //@ts-ignore msg.guild.musicData.songDispatcher.end(); + //@ts-ignore msg.guild.musicData.queue.length = 0; // clear queue return; } -- cgit v1.2.3