commandkit icon indicating copy to clipboard operation
commandkit copied to clipboard

generate commands before they are passed to the CommandRegistrar

Open twlite opened this issue 2 months ago • 0 comments

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.

twlite avatar Oct 07 '25 10:10 twlite