devRael1 / discordjs-pagination

A pagination system for Discord.js v14
https://www.npmjs.com/package/@devraelfreeze/discordjs-pagination
MIT License
11 stars 10 forks source link

Question about timeouts and disabling buttons #10

Closed EndritElshani closed 1 year ago

EndritElshani commented 1 year ago

Hi, so I have a leaderboard command that shows a leaderboard of all the users in my database. Is it OK to not use a timeout or to not disable the buttons at all so that people can check the leaderboard whenever they want? Does it cause any issues? I have commented out these options and it works just fine, I just wanted to know if that's OK.

    await pagination({
      embeds: leaderboardEmbeds /** Array of embeds objects */,
      interaction: interaction,
      //ephemeral: true,
      //time: 40000 /** 40 seconds */,
      //disableButtons: true /** Remove buttons after timeout */,
      fastSkip: false,
      pageTravel: false,
      buttons: [
        {
          type: ButtonTypes.previous,
          label: "Previous Page",
          style: ButtonStyles.Primary,
        },
        {
          type: ButtonTypes.next,
          label: "Next Page",
          style: ButtonStyles.Success,
        },
      ],
    });
devRael1 commented 1 year ago

Hi, yes, you can disable time etc. But note this:

If the bot stop / restart for X or Y reason, the message will not work anymore, and you will have to retype the command to create your leaderboard.