aboutsummaryrefslogtreecommitdiff
path: root/src/commands/queue.ts
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-04-30 12:05:45 -0400
committerMax Isom <[email protected]>2021-04-30 12:05:45 -0400
commitd61107aedd5a7108cd3dc1eb6a542ed38f551e00 (patch)
tree88e626265ebababf57a452e95dfda430803d5d81 /src/commands/queue.ts
parent91da6d0064decca8fe5f7537aeeb9bc77ce7934c (diff)
downloadmuse-d61107aedd5a7108cd3dc1eb6a542ed38f551e00.tar.xz
muse-d61107aedd5a7108cd3dc1eb6a542ed38f551e00.zip
Add play immediate feature
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');