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

request: only fetch guild commands for guilds that have commands associated #522

Closed
1 task done
maddysrc opened this issue Aug 31, 2022 · 0 comments · Fixed by #523
Closed
1 task done

request: only fetch guild commands for guilds that have commands associated #522

maddysrc opened this issue Aug 31, 2022 · 0 comments · Fixed by #523

Comments

@maddysrc
Copy link

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Currently, to initialise ApplicationCommandRegistries the framework fetches all guild command for all guilds on startup. This has turned out to be unfeasible for bots with a large amount of guilds, easily creating startup times of several minutes if not hours.

Desired solution

The framework should only fetch commands for a guild when its guild id is specified in a command's register options, making sure only guilds relevant to the application code have their guilds commands fetched. This would make the bot only have to fetch a few guilds at worst and none at all in most scenarios.

Alternatives considered

None

Additional context

https://discord.com/channels/737141877803057244/737142774738190377/1014595177232465991

@vladfrangu vladfrangu self-assigned this Sep 1, 2022
@vladfrangu vladfrangu added this to the v3.1.1 milestone Sep 1, 2022
@favna favna moved this to Todo in Sapphire Sep 1, 2022
@favna favna added this to Sapphire Sep 1, 2022
@favna favna closed this as completed in #523 Sep 3, 2022
Repository owner moved this from Todo to Done in Sapphire Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants