🧹
Purge Messages
mod.purgeThe Mod SquadModerationDeletes up to 100 messages from a channel in one sweep. Discord only allows bulk-deleting messages under 14 days old. Perfect for cleaning up spam raids, accidental leaks, or bot noise.
When to use this
- →Max is 100 messages per purge — chain multiple for bigger cleans
- →Discord won't bulk-delete messages older than 14 days
- →The bot needs Manage Messages in the target channel
On the canvas
This is what Purge Messages looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🧹Moderation
Purge Messages
mod.purgechannelIdrequired
{{channel.id}}
countrequired
10 (max 100)
output
error
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
channelId{{channel.id}} | text | yes | Channel ID 📍 |
count10 (max 100) | number | yes | How many to delete 🔢 |
Output ports
outputPurge complete
errorFailed — Manage Messages missing, or messages too old
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const channel = await guild.channels.fetch(channelId);
if (channel?.isTextBased()) {
const deleted = await channel.bulkDelete(count, true);
// Max 100; messages must be < 14 days old
}More Moderation pieces