✏️
Message edited
messageUpdateMESSAGE_UPDATETriggerFires when a message is edited.
When to use this
- →Edit logging
- →Re-scanning edited content for filters
On the canvas
This is what the trigger looks like in your bot's Triggers tab. The sparks listed are available in every node inside the linked flow.
✏️Trigger
Message edited
messageUpdateSparks in this flow
{{input.guild.id}}Your Discord server's unique ID{{input.guild.name}}Your server's name{{input.guild.memberCount}}How many members are in the server{{input.guild.icon}}Your server's icon image (empty if it has none){{oldMessage.content}}The message before the edit (empty if uncached){{newMessage.content}}The message after the edit{{message.id}}The message's unique ID{{message.author.id}}Discord ID of who sent the message{{message.author.name}}Author's username{{message.channelId}}ID of the channel{{channel.id}}ID of the channel (same as message.channelId){{channel.name}}Name of the channel{{message.image}}First image on the edited message — attachment, embed image or sticker{{message.images}}Every image on the edited message, as a list{{message.imageCount}}How many images the edited message carries{{message.attachments}}Every file attached to the edited message (images or not){{message.author.avatar}}Avatar of whoever sent the edited message{{message.url}}Link that jumps straight to the edited messageAvailable sparks
Use these in any piece config field inside flows triggered by this event.
| Spark | Type | Description |
|---|---|---|
{{input.guild.id}} | string | Your Discord server's unique ID |
{{input.guild.name}} | string | Your server's name |
{{input.guild.memberCount}} | string | How many members are in the server |
{{input.guild.icon}} | image | Your server's icon image (empty if it has none) |
{{oldMessage.content}} | string | The message before the edit (empty if uncached) |
{{newMessage.content}} | string | The message after the edit |
{{message.id}} | string | The message's unique ID |
{{message.author.id}} | string | Discord ID of who sent the message |
{{message.author.name}} | string | Author's username |
{{message.channelId}} | string | ID of the channel |
{{channel.id}} | string | ID of the channel (same as message.channelId) |
{{channel.name}} | string | Name of the channel |
{{message.image}} | image | First image on the edited message — attachment, embed image or sticker |
{{message.images}} | array | Every image on the edited message, as a list |
{{message.imageCount}} | number | How many images the edited message carries |
{{message.attachments}} | array | Every file attached to the edited message (images or not) |
{{message.author.avatar}} | image | Avatar of whoever sent the edited message |
{{message.url}} | string | Link that jumps straight to the edited message |
📐
In TypeScript, this would be…
Not something you need to write — Kitcord registers these listeners automatically from your Kit.
TypeScript
client.on("messageUpdate", (oldMessage, newMessage) => {
// {{oldMessage.content}}, {{newMessage.content}}
});