diff options
| author | Max Isom <[email protected]> | 2020-03-16 12:01:22 -0500 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2020-03-16 12:01:22 -0500 |
| commit | 53cd705bde65ea092642e437f95ba39ec087eac8 (patch) | |
| tree | b053acdf74634fe7697e8390ead02673da058499 /src/commands | |
| parent | 18e851821caa13747c8d946abe36d3e2e5d6dcbd (diff) | |
| download | muse-53cd705bde65ea092642e437f95ba39ec087eac8.tar.xz muse-53cd705bde65ea092642e437f95ba39ec087eac8.zip | |
Allow skipping past current song in empty queue
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/skip.ts | 7 |
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'); } } |
