✏️
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{{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 channelAvailable 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 |
{{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 |
📐
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}}
});