diff options
| author | 8cy <[email protected]> | 2020-07-07 03:55:21 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-07 03:55:21 -0700 |
| commit | 385b0960abdc8bb13172330a973dafd56560cf8d (patch) | |
| tree | 86e85d23404a5170ffbf870a6faeba77b3430e0e /src/commands/voice/pause.ts | |
| parent | add fanart for emma :star2: (diff) | |
| download | dep-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/pause.ts')
| -rw-r--r-- | src/commands/voice/pause.ts | 15 |
1 files changed, 9 insertions, 6 deletions
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 |