discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

feat: interaction paginator #50

Closed onerandomusername closed 3 years ago

onerandomusername commented 3 years ago

Relevant Issues

Closes #49

Description

codecov[bot] commented 3 years ago

Codecov Report

Merging #50 (435da8f) into main (50f164b) will decrease coverage by 0.80%. The diff coverage is 35.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
- Coverage   39.42%   38.62%   -0.81%     
==========================================
  Files          13       16       +3     
  Lines         596      769     +173     
  Branches       70      105      +35     
==========================================
+ Hits          235      297      +62     
- Misses        354      459     +105     
- Partials        7       13       +6     
Impacted Files Coverage Δ
modmail/extensions/extension_manager.py 0.00% <0.00%> (ø)
modmail/extensions/plugin_manager.py 0.00% <0.00%> (ø)
modmail/extensions/utils/paginator_manager.py 0.00% <0.00%> (ø)
modmail/utils/pagination.py 42.96% <42.96%> (ø)
modmail/utils/errors.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 50f164b...435da8f. Read the comment docs.

onerandomusername commented 3 years ago

While this doesn't subclass the discord.py Paginator, I've been contemplating later implementing the Paginator when we write our custom help command. This is because the help command uses the Paginator to display the help information, but I don't exactly want to mixin the Paginator into this paginator.

If someone wants to implement the discord.py Paginator as a mixin to this paginator, I'll happily add it.

onerandomusername commented 3 years ago

Went for it, just integrated the discordpy Paginator into the Button Paginator. Still needs some features added (specifically embeds) and maybe touched up a bit, but other than that, looks pretty good.

onerandomusername commented 3 years ago

Still needs a few more tests added.

onerandomusername commented 3 years ago

More than just those tests.

onerandomusername commented 3 years ago

@bast0006 Part 2?