aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/skip.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/skip.ts b/src/commands/skip.ts
index 87fb94d..ec0e83e 100644
--- a/src/commands/skip.ts
+++ b/src/commands/skip.ts
@@ -23,10 +23,15 @@ export default class implements Command {
try {
queue.forward();
- await this.playerManager.get(msg.guild!.id).play();
+ if (queue.isEmpty()) {
+ this.playerManager.get(msg.guild!.id).disconnect();
+ } else {
+ await this.playerManager.get(msg.guild!.id).play();
+ }
await msg.channel.send('keepin\' \'er movin\'');
} catch (_) {
+ console.log(_);
await msg.channel.send('no song to skip to');
}
}