bot.onMessageDelete
This callback allows the bot to log any deleted message
1
bot.deletedCommand({ //command
2
channel: "channel id",
3
code: `your code` //Message that will be sent to the channel
4
})
5
bot.onMessageDelete() //callback itself
Copied!
Using the callback
1
bot.deletedCommand({
2
channel: "782446718704812032",
3
code: `Message from $username, was deleted in <#$channelUsed>: $message`
4
/*
5
Code Breakdown
6
$username - The user who wrote the message
7
$channelUsed - The channel where the message was deleted
8
$message - The message that was deleted
9
*/
10
})
11
bot.onMessageDelete()
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub