diff options
| author | Max Isom <[email protected]> | 2020-03-19 19:16:07 -0500 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2020-03-19 19:16:07 -0500 |
| commit | f25467a41db64b239eb3f248f4be7dbecec0f14f (patch) | |
| tree | ad7babf6e15c5a0593fcb7e073ad9a05a06decce /src/commands/skip.ts | |
| parent | 4659717e5f314d061f9748331c79d507df971f7f (diff) | |
| download | muse-f25467a41db64b239eb3f248f4be7dbecec0f14f.tar.xz muse-f25467a41db64b239eb3f248f4be7dbecec0f14f.zip | |
Small bug fixes
Diffstat (limited to 'src/commands/skip.ts')
| -rw-r--r-- | src/commands/skip.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/commands/skip.ts b/src/commands/skip.ts index cc5c1c4..1eb23a0 100644 --- a/src/commands/skip.ts +++ b/src/commands/skip.ts @@ -25,19 +25,18 @@ export default class implements Command { public async execute(msg: Message, _: string []): Promise<void> { const queue = this.queueManager.get(msg.guild!.id); + const player = this.playerManager.get(msg.guild!.id); try { queue.forward(); + player.resetPosition(); if (queue.isEmpty() && !queue.getCurrent()) { - this.playerManager.get(msg.guild!.id).disconnect(); - } else { - await this.playerManager.get(msg.guild!.id).play(); + player.disconnect(); } await msg.channel.send('keep \'er movin\''); } catch (_) { - console.log(_); await msg.channel.send('no song to skip to'); } } |
