discord-ext-menus icon indicating copy to clipboard operation
discord-ext-menus copied to clipboard

Menu subclassing and buttons

Open wereii opened this issue 4 years ago • 1 comments

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 avatar Oct 02 '20 10:10 wereii

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()

wereii avatar Oct 04 '20 13:10 wereii