ryzyx / discordjs-button-pagination

A simple package for pagination using buttons introduced in discord.js v13.
https://www.npmjs.com/package/discordjs-button-pagination
MIT License
48 stars 31 forks source link

Defer reply if not already deferred #16

Closed thoughts3rased closed 3 years ago

thoughts3rased commented 3 years ago

This has been tested with both deferred and non-deferred replies. Since there's no minimum limit on replying after deferral, it might be best to defer all replies in order to save on lines where methods would be changed depending on whether it's been deferred or not, especially since it ends up deferred later on down the line.

thoughts3rased commented 3 years ago

image (ignore the messed up embeds, that's my fault and is unrelated to the changes)

The top one is a deferred reply and the bottom one is a non-deferred reply. Both are able to navigate pages. Buttons are still solid past their timeout due to the fact that I closed my bot to make changes before the timeout expired.