You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
Discord recently shipped context menu commands for users and messages. It would be great if these can be supported as additional decorators.
They are, for the most part, registered and handled the same way as slash commands, with the only differences being:
There is no description
There are no options (the Interaction includes the user/message that the menu was used on)
An example usage would be something like:
@ContextMenu('Mute','USER')
@Guild(GUILD_ID)
@Permission(ROLE_ID,"ROLE")privateasyncmute(interaction: ContextMenuInteraction){constuser=awaitinteraction.guild.members.fetch(interaction.targetId);awaitdo_some_thing_with(message);interaction.reply("done with message");}
An alternative is to have separate @MessageContextMenu and @UserContextMenu decorators instead of a single one where the type can be toggled. This does not make a practical difference, since discord.js does not distinguish between the two types of responses and the function signature remains the same.
The text was updated successfully, but these errors were encountered:
Discord recently shipped context menu commands for users and messages. It would be great if these can be supported as additional decorators.
They are, for the most part, registered and handled the same way as slash commands, with the only differences being:
An example usage would be something like:
An alternative is to have separate
@MessageContextMenu
and@UserContextMenu
decorators instead of a single one where the type can be toggled. This does not make a practical difference, since discord.js does not distinguish between the two types of responses and the function signature remains the same.The text was updated successfully, but these errors were encountered: