summaryrefslogtreecommitdiff
path: root/src/commands/voice/loop.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/voice/loop.ts')
-rw-r--r--src/commands/voice/loop.ts20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/commands/voice/loop.ts b/src/commands/voice/loop.ts
index eb289a4..a12c4e8 100644
--- a/src/commands/voice/loop.ts
+++ b/src/commands/voice/loop.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 LoopVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'loop',
aliases: ['repeat'],
@@ -19,19 +20,20 @@ module.exports = class LoopVoice 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());
}
- msg.say(
- `${msg.guild.musicData.nowPlaying.title} added to queue. ` + emoji.random()
- );
+ //@ts-ignore
+ msg.say(`${msg.guild.musicData.nowPlaying.title} added to queue. ` + emoji.random());
+ //@ts-ignore
msg.guild.musicData.queue.unshift(msg.guild.musicData.nowPlaying);
return;
}