[Feature Request] Allow passing on **kwargs to red.menu to be used in custom button actions. #2362
Open
1 of 3 tasks
Labels
Category: Core - API - Utils Package
This is related to stuff in `redbot.core.utils`
Status: Needs Discussion
Needs more discussion.
Type: Enhancement
Something meant to enhance existing Red features.
Feature request
Select the type of feature you are requesting:
Describe your requested feature
In addition to just browsing between different page in the page list, it should be possible to (properly) use custom-made actions on a Red Menu. For this, one should be able to pass on **kwargs to the Red Menu, so that they can be caught and used by the custom button actions. Especially since Red is meant to be modular, I think adding this would be handy. Also because this makes the menu usable in a lot more scenarios.
Think about...
.csv
if they click on a certain emoji, like ⏬.Technically this can already be achieved in a "hacky" way, namely by making an asynchronous function inside a command, making a custom embed control dict, and calling that internal command in one of the values. However, it forces someone to rewrite this function inside every command that they would like to have it for, and that for every single function. Also, it would either force people to (temporarily) store values in class attributes, or to call a
nonlocal
inside the nested function to use certain variables.Being able to pass on
**kwargs
and catch those inside the custom functions would be much more convenient (and cleaner) than the above.The text was updated successfully, but these errors were encountered: