
What it is
Not every command needs to be typed. User and Message commands live in Discord's right-click menu: a member right-clicks someone or a message, opens Apps and picks your command. Your bot then knows exactly who or what was clicked, so there is nothing to type and no ID to copy.
Set it up
- Open a new or existing command in the Command Builder.
- In its settings, find the Command type row and click Change.
- Pick User Command or Message Command, give it a name such as
View ProfileorReport Message, then save.
Not sure which one you need? Click Demo on any type to see how members use it in Discord.
Use the clicked member or message
The clicked target is ready in your blocks. A User command gets the {target_user_...} variables for the member. A Message command gets the {target_message_...} variables, plus the {target_user_...} variables for the message's author. You'll find them all under Command Variables in the variable picker.
{target_user}The clicked member as a mention (in a Message command, the message's author){target_user_id}Their user ID{target_user_displayname}Their display name{target_message_content}The text of the clicked message{target_message_url}A link to the clicked message{target_message_attachments}The links to the message's attachmentsGood to know
- Discord allows 15 User commands and 15 Message commands per bot. The Command type picker shows how many you've used, and commands in your enabled modules count too.
- User and Message commands can't have options, because Discord fills in the clicked member or message for you. Remove any option blocks before you switch.
- Names can use capital letters and spaces, up to 32 characters, and can match the name of a slash command.
- They keep their actions, cooldown and permissions.
- Your existing commands stay slash commands, and new commands start as slash commands unless you pick another type.
Full list of changes
- NewUser and Message commands that members run from Discord's right-click Apps menu
- NewCommand type picker in a command's settings, with a Demo of each type and a count of the 15 you can have
- New
{target_user_...}and{target_message_...}variables for the clicked member or message, such as{target_message_content}