Entity Info
messageID
$messageID
The function $messageID returns the unique identifier (snowflake) of the message that triggered the execution of the command.
Syntax
$messageID
Parameters
None.
Return Value
| Type | Description |
|---|---|
string |
The value of the message.id context variable supplied by the host (the ID of the triggering message), or an empty string if the host supplied none. |
Examples
Display the message ID
$sendMessage[Message ID: $messageID]
Direct link to the message
$sendMessage[Link to the message: https://discord.com/channels/$guildID/$channelID/$messageID]
Log the ID
$channelSendMessage[$channelIDFromName[logs];Message $messageID processed by $username.]
Delete the message after processing
$deleteMessage[$channelID;$messageID]
$sendMessage[Message processed and deleted.]
Notes
- Can be used with
$deleteMessageand$editMessage. $messageIDtakes no argument.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.