var trigger = message_delete()
func main() {
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Message ID: " + trigger.message_id,
})
}
Message Deleted
Event triggerMessages
Triggers when a message is deleted.
Message content and Author ID are available if Message Cache is enabled in branch settings.
Outputs
Message ID
The ID of the deleted message
Example: 123456789012345678
Channel ID
The ID of the channel where the message was deleted
Example: 123456789012345678
Server ID
The ID of the server where the message was deleted
Example: 123456789012345678
Previous Message Content
Content of the deleted message if available
Example: This is a message
Author ID
The ID of the user who sent the deleted message
Example: 123456789012345678
Message Cache Hit
Whether the previous message content was retrieved from cache
Example: true
Build a bot using triggers like Message Deleted
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:
message_deleteOutputs
| Field | InventScript name | Value |
|---|---|---|
| Message ID | message_id | e.g. "123456789012345678" |
| Channel ID | channel_id | e.g. "123456789012345678" |
| Server ID | server_id | e.g. "123456789012345678" |
| Previous Message Content | previous_content | e.g. "This is a message" |
| Author ID | author_id | e.g. "123456789012345678" |
| Message Cache Hit | message_cache_hit | e.g. "true" |
Example InventScript
More messages triggers
Message SentTriggers when a message is sent.DM Message SentTriggers when a direct message is sent to the bot.Message CommandTriggers when a message command (like !help) is sent.Message Sent by BotTriggers when a message is sent by a bot.Message EditedTriggers when a message is edited.Message Edited by BotTriggers when a message is edited by a bot.Message Delete BulkTriggers when messages are deleted in bulk.Poll Vote AddedTriggers when a user votes in a poll.Poll Vote RemovedTriggers when a user removes their vote in a poll.