summaryrefslogtreecommitdiff
path: root/src/commands/voice/skipall.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-07 03:55:21 -0700
committer8cy <[email protected]>2020-07-07 03:55:21 -0700
commit385b0960abdc8bb13172330a973dafd56560cf8d (patch)
tree86e85d23404a5170ffbf870a6faeba77b3430e0e /src/commands/voice/skipall.ts
parentadd fanart for emma :star2: (diff)
downloaddep-core-385b0960abdc8bb13172330a973dafd56560cf8d.tar.xz
dep-core-385b0960abdc8bb13172330a973dafd56560cf8d.zip
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
Diffstat (limited to 'src/commands/voice/skipall.ts')
-rw-r--r--src/commands/voice/skipall.ts17
1 files changed, 11 insertions, 6 deletions
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;
}