Vexed01 / Vex-Cogs

My cogs for Red.
https://cogdocs.vexcodes.com
GNU General Public License v3.0
27 stars 20 forks source link

[Birthday] Add pagination for more than 25 entries for "upcoming" #129

Closed ajwsert closed 5 months ago

ajwsert commented 6 months ago

What cog is this feature request for?

Birthday

Describe the feature request in as much detail as possible

Initially, for the upcoming command, when there was more than 25 entries (days) the cog would show only 25 entries with a notice saying it did so. I know it's due embed field limitation. However, with the latest update something broke. It started to throwing an error in those cases, apparently due attempting to create an embed with more fields than allowed:

Command 'upcoming' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In data.embeds.0.fields: Must be 25 or fewer in length.

My suggestion is about adding some type of pagination that I believe would be helpful. It would either prevent hitting that limit as allowing to view everything instead being limited to the first 25 as it was initially.

Vexed01 commented 5 months ago

Thanks for reporting. It looks like I tried to handle this but missed quite an important line to remove the excess birthdays!

Pagination may come when I have more time. You or anyone else are welcome to submit a PR.