mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(music): add multi-page pagination to top leaderboard command
- Integrate QueuePaginator into commands/top.mjs for interactive browsing (⬅️ / ➡️) - Support direct page jumping via slash option and text arguments (%top [timeframe] [page]) - Paginate tracks into 10 items per page up to 50 tracks with dynamic rank badges - Increase track query limits in GuildStats.mjs across MySQL and in-memory caches
This commit is contained in:
1 parent
452c080224
commit
ade75a4a79
10 files changed
+113
-49
No files matched your search
@@ -255,7 +255,7 @@ class GuildStatsManager {
|
||||
* @returns {Promise<{tracks: Array, topArtist: {name: string, count: number}|null}>}
|
||||
*/
|
||||
async getTopTracks(guildId, timeframe = "month", limit = 10) {
|
||||
const lim = Math.max(1, Math.min(25, Number(limit) || 10));
|
||||
const lim = Math.max(1, Math.min(100, Number(limit) || 10));
|
||||
|
||||
if (this._pool) {
|
||||
try {
|
||||
@@ -366,7 +366,7 @@ class GuildStatsManager {
|
||||
* @returns {Promise<{tracks: Array, topArtist: {name: string, count: number}|null}>}
|
||||
*/
|
||||
async getGlobalTopTracks(limit = 10) {
|
||||
const lim = Math.max(1, Math.min(25, Number(limit) || 10));
|
||||
const lim = Math.max(1, Math.min(100, Number(limit) || 10));
|
||||
|
||||
if (this._pool) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user