Skip to content

generate commands before they are passed to the CommandRegistrar #558

@twlite

Description

@twlite

Currently, commands such as UserContextMenu or MessageContextMenu are dynamically generated by the CommandRegistrar and routed via nameAliases from the CommandHandler. This causes the CommandHandler to not have the information of the context menu commands as they do not exist until CommandRegistrar generates them before registering the commands to Discord.

We can keep the command routing logic as it is but let the command handler know about the existence of context menu commands by populating it in the cache immediately after loading the command file.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions