Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Menu subclassing and buttons #21

Open
wereii opened this issue Oct 2, 2020 · 1 comment
Open

Menu subclassing and buttons #21

wereii opened this issue Oct 2, 2020 · 1 comment

Comments

@wereii
Copy link

wereii commented Oct 2, 2020

Hello,
I've been playing with this library for a while now.
From what it seems, the current buttons ecosystem does not take in count the possibility of the Menu class being subclassed and the button methods overridden (with it's own button decorator), right?

EDIT: I mean, subclassing for example MenuPages, basically if I override stop_button with it's own button decorator (because I want to change the emoji for it) but even after that I can still see the original MenuPages.stop_button in self.buttons. Like this I guess the only way would be to manually delete_button of meths that I've overridden (for example in init)

@wereii
Copy link
Author

wereii commented Oct 4, 2020

So I did my work and found out the subclassing is definitely working as it should.

My problem was caused by a button emoji that wasn't recognized by discord, throwing HTTP exception in a task which swallows these exceptions. The menu reacts simply stopped being added after trying to add the wrong emoji and because of some lucky ordering all my overridden custom buttons were not added.

The task in question is: __init__.py:L699 add_reactions_task()

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant