aboutsummaryrefslogtreecommitdiff
path: root/src/commands/queue.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/queue.ts')
-rw-r--r--src/commands/queue.ts6
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');