Message Context Menu

Interaction triggerInteractions

Triggers when a user runs a context menu command on a message.

  • Interaction trigger: the flow can reply to the user directly, with messages, modals and more.

Options

Command NameRequired

The name of the context menu command (1-32 chars).

Example: Report Message

Required Permissions

Permissions a member needs to use this command. Leave empty to allow everyone.

OptionsAdd ReactionsAdministratorAttach FilesBan MembersBypass SlowmodeChange NicknameConnectCreate EventsCreate ExpressionsCreate Instant InviteCreate Private ThreadsCreate Public ThreadsDeafen MembersEmbed LinksKick MembersManage ChannelsManage EmojisManage EventsManage MessagesManage NicknamesManage RolesManage ServerManage ThreadsManage WebhooksMention EveryoneMove MembersMute MembersPin MessagesPriority SpeakerRead Message HistoryRequest to SpeakSend MessagesSend Messages in ThreadsSend PollsSend TTS MessagesSend Voice MessagesSet Voice Channel StatusSpeakStreamTimeout MembersUse Application CommandsUse Embedded ActivitiesUse External AppsUse External EmojisUse External SoundsUse External StickersUse SoundboardUse VADView Audit LogView ChannelView Creator Monetization AnalyticsView Guild Insights

Outputs

User ID

ID of the user who ran the command.

Example: 123456789012345678

Username

Username of the user who ran the command.

Example: johndoe

User Avatar URL

Avatar URL of the user who ran the command.

Example: https://cdn.discordapp.com/avatars/123/abc.png

Channel ID

Channel where the command was used.

Example: 123456789012345678

Server ID

Server where the command was used.

Example: 123456789012345678

Application ID

ID of the application that received this interaction.

Example: 123456789012345678

Command ID

ID of the context menu command that Discord invoked.

Example: 123456789012345678

Interaction ID

Unique interaction ID for this command invocation.

Example: 123456789012345678

Interaction Token

Token for this interaction, useful for webhook follow-up/edit operations.

Example: aW50ZXJhY3Rpb25fdG9rZW4

App Permissions

Permissions the bot/application had in the interaction channel, as a Discord bitfield string.

Example: 274877990912

User Locale

Discord locale of the user who ran the command.

Example: en-US

Server Locale

Preferred locale of the server where the command was used, when available.

Example: en-US

Interaction Context

Where the interaction was used (`server`, `bot_dm`, or `private_channel`).

Example: server

Target Message ID

ID of the message the command was used on.

Example: 123456789012345678

Target Message Content

Content of the message the command was used on.

Example: Hello world!

Target Message Author ID

ID of the author of the message the command was used on.

Example: 123456789012345678

Target Channel ID

Channel ID of the message the command was used on, when available.

Example: 123456789012345678

Target Server ID

Server ID of the message the command was used on, when available.

Example: 123456789012345678

Build a bot using triggers like Message Context Menu

Use this trigger in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: context_menu_message
  • Interaction trigger: blocks that respond to interactions (replies, modals, ...) can be used in its flows.

Options

FieldInventScript nameValue
Command Namecommand_namee.g. "Report Message"
Required Permissionsdefault_member_permissions"Add Reactions", "Administrator", "Attach Files", "Ban Members", "Bypass Slowmode", "Change Nickname", "Connect", "Create Events", "Create Expressions", "Create Instant Invite", "Create Private Threads", "Create Public Threads", "Deafen Members", "Embed Links", "Kick Members", "Manage Channels", "Manage Emojis", "Manage Events", "Manage Messages", "Manage Nicknames", "Manage Roles", "Manage Server", "Manage Threads", "Manage Webhooks", "Mention Everyone", "Move Members", "Mute Members", "Pin Messages", "Priority Speaker", "Read Message History", "Request to Speak", "Send Messages", "Send Messages in Threads", "Send Polls", "Send TTS Messages", "Send Voice Messages", "Set Voice Channel Status", "Speak", "Stream", "Timeout Members", "Use Application Commands", "Use Embedded Activities", "Use External Apps", "Use External Emojis", "Use External Sounds", "Use External Stickers", "Use Soundboard", "Use VAD", "View Audit Log", "View Channel", "View Creator Monetization Analytics", "View Guild Insights"

Outputs

FieldInventScript nameValue
User IDuser_ide.g. "123456789012345678"
Usernameusernamee.g. "johndoe"
User Avatar URLuser_avatare.g. "https://cdn.discordapp.com/avatars/123/abc.png"
Channel IDchannel_ide.g. "123456789012345678"
Server IDserver_ide.g. "123456789012345678"
Application IDapplication_ide.g. "123456789012345678"
Command IDcommand_ide.g. "123456789012345678"
Interaction IDinteraction_ide.g. "123456789012345678"
Interaction Tokeninteraction_tokene.g. "aW50ZXJhY3Rpb25fdG9rZW4"
App Permissionsapp_permissionse.g. "274877990912"
User Localeuser_localee.g. "en-US"
Server Localeserver_localee.g. "en-US"
Interaction Contextinteraction_contexte.g. "server"
Target Message IDtarget_message_ide.g. "123456789012345678"
Target Message Contenttarget_message_contente.g. "Hello world!"
Target Message Author IDtarget_message_author_ide.g. "123456789012345678"
Target Channel IDtarget_channel_ide.g. "123456789012345678"
Target Server IDtarget_server_ide.g. "123456789012345678"

Example InventScript

var trigger = context_menu_message(Args{command_name: "Report Message"})

func main() {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "User ID: " + trigger.user_id,
	})
}

More interactions triggers