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/pause.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/commands/voice/pause.ts') diff --git a/src/commands/voice/pause.ts b/src/commands/voice/pause.ts index 1f23661..500a320 100644 --- a/src/commands/voice/pause.ts +++ b/src/commands/voice/pause.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 PauseVoice extends Command { - constructor(client) { + constructor(client: CommandoClient) { super(client, { name: 'pause', group: 'voice', @@ -18,19 +19,21 @@ module.exports = class PauseVoice 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('Song paused :pause_button:'); + //@ts-ignore msg.guild.musicData.songDispatcher.pause(); } }; \ No newline at end of file -- cgit v1.2.3