diff options
| author | Max Isom <[email protected]> | 2021-04-30 12:05:45 -0400 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2021-04-30 12:05:45 -0400 |
| commit | d61107aedd5a7108cd3dc1eb6a542ed38f551e00 (patch) | |
| tree | 88e626265ebababf57a452e95dfda430803d5d81 /src/commands/queue.ts | |
| parent | 91da6d0064decca8fe5f7537aeeb9bc77ce7934c (diff) | |
| download | muse-d61107aedd5a7108cd3dc1eb6a542ed38f551e00.tar.xz muse-d61107aedd5a7108cd3dc1eb6a542ed38f551e00.zip | |
Add play immediate feature
Diffstat (limited to 'src/commands/queue.ts')
| -rw-r--r-- | src/commands/queue.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commands/queue.ts b/src/commands/queue.ts index 8bfe155..0abc63c 100644 --- a/src/commands/queue.ts +++ b/src/commands/queue.ts @@ -35,7 +35,9 @@ export default class implements Command { const queueSize = player.queueSize(); const queuePage = args[0] ? parseInt(args[0], 10) : 1; - if (queuePage * PAGE_SIZE > queueSize && queuePage > Math.ceil((queueSize + 1) / PAGE_SIZE)) { + const maxQueuePage = Math.ceil((queueSize + 1) / PAGE_SIZE); + + if (queuePage > maxQueuePage) { await msg.channel.send(errorMsg('the queue isn\'t that big')); return; } @@ -70,6 +72,8 @@ export default class implements Command { embed.addField(`${(i + 1 + queuePageBegin).toString()}/${queueSize.toString()}`, song.title, false); }); + embed.addField('Page', `${queuePage} out of ${maxQueuePage}`, false); + await msg.channel.send(embed); } else { await msg.channel.send('queue empty'); |
