DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
BanCommand
BotJoinCommand
BotLeaveCommand
ChannelCreateCommand
ChannelDeleteCommand
ChannelUpdateCommand
EmojiCreateCommand
EmojiDeleteCommand
GuildUpdateCommand
JoinedCommand
LeaveCommand
LoopCommand
MessageDeleteCommand
MessageEditEvent
RateLimitCommand
ReadyCommand
ReactionAddCommand
ReactionRemoveCommand
RoleCreateCommand
RoleDeleteCommand
UnbanCommand
UserUpdateCommand
Functions
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
MessageDeleteCommand
Triggers when a message is deleted from a guild channel. The $message function can be used to retrieve the content from the deleted message!
​
Example 1: The event placed in the main file.
1
bot.MessageDeleteCommand({
2
name: "$getServerVar[channel]",
3
code: `
4
<@$authorID> has deleted a message!
5
content: $message[]
6
`
7
})
8
bot.onMessageDelete()
Copied!
​
Example 2: The event placed in the
event handler
(its own file)
bot.onMessageDelete()
- Goes in the main file to be able to call the event!
1
module.exports.MessageDeleteCommand = ({
2
name: "$systemChannelID",
3
code: `
4
<@$authorID> has deleted a message!
5
content: $message[]
6
`
7
})
Copied!
Previous
LoopCommand
Next
MessageEditEvent
Last modified
10mo ago
Copy link
Contents