onMessageDelete
Triggers when a message is deleted.
Add The Event: bot.addEvent("onMessageDelete")
Type: deleteCommand
Base Code
bot.command({
type: "deleteCommand", // onMessageDelete type.
channel: "channelID", // The channel which the message gets sent in.
code: `code` // The code to run a message is deleted.
})
Example
bot.command({
type: "deleteCommand",
channel: "39459438494840494",
code: `A message was deleted by <@$authorID>. Contents: $message`
})
Last updated
Was this helpful?