Skip to content

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

@maddysrc

Description

@maddysrc

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

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions