mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: solve bug using getNumber after changing to addIntegerOption
This commit is contained in:
1 parent
6ca7ce3e4b
commit
4b630e2512
8 files changed
+8
-8
No files matched your search
@@ -122,7 +122,7 @@ abstract class BaseInteraction {
|
||||
return { text: 'Page 1 of 1 (0 tracks)' };
|
||||
}
|
||||
|
||||
const pageIndex: number = (interaction.options.getNumber('page') || 1) - 1;
|
||||
const pageIndex: number = (interaction.options.getInteger('page') || 1) - 1;
|
||||
const totalPages: number = Math.ceil(queue.tracks.data.length / 10) || 1;
|
||||
return {
|
||||
text: `Page ${pageIndex + 1} of ${totalPages} (${queue.tracks.data.length} tracks)`
|
||||
|
||||
Reference in new issue
Block a user