$deleteMessage
Deletes a message in any channel. Optionally provide a time and the bot will delete the message in that given time. If no time is defined, bot will immediately delete the message.

FUNCTION USAGE

  • $deleteMessage[channelID;messageID]
  • $deleteMessage[channelID;messageID;time]

Properties:

channelID - Define a channel with the ID messageID - Define a message to delete with the ID time - Define a time to tell the bot to delete the message after command execution.

Example 1: Deleting a message in the current channel.

1
bot.Command({
2
name: "test",
3
code: `
4
$deleteMessage[$channelID;456384698672893745]
5
`
6
})
Copied!

Example 2: Deleting a message in another channel.

1
bot.Command({
2
name: "test",
3
code: `
4
$deleteMessage[$findChannel[$message[1]];456384698672893745]
5
`
6
})
Copied!

Example 3: Deleting a message in the current channel 10 seconds after command execution..

1
bot.Command({
2
name: "test",
3
code: `
4
$deleteMessage[$channelID;456384698672893745;10s]
5
`
6
})
Copied!
Last modified 5mo ago
Copy link
Contents
Properties: