Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

subclass CommandTree #145

Open
deadaf opened this issue Jun 23, 2023 · 2 comments
Open

subclass CommandTree #145

deadaf opened this issue Jun 23, 2023 · 2 comments
Labels
enhancement New feature or request priority:medium

Comments

@deadaf
Copy link
Member

deadaf commented Jun 23, 2023

With every help command we make an API call to get a list of all slash commands in the bot. A better way to do this might be overriding fetch_commands method to cache the results.

Also, we need to figure out a way to mention sub-commands since parents mention doesn't work & is basically useless.

image

@deadaf deadaf added enhancement New feature or request priority:medium labels Jun 23, 2023
@rtk-rnjn
Copy link
Contributor

monkey patching fetch_commands() is really bad idea, I say we fetch and cache app commands on bot login.
And create arbitrary function something like Quotient.get_app_command() similar to dpy Bot.get_command()

@deadaf
Copy link
Member Author

deadaf commented Jun 25, 2023

yeah actually that too is a good idea & even less work tbh. I think a method in the Quotient should be a fine approach here.
It will fetch commands for the first time then every time it is called, it will return cached results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants