BotFrame
Skip to content

Quick-start template · Free

Moderation commands

Remove recent messages with a command that checks who is using it. The Moderation commands template gives authorized moderators /clear and replies without deleting anything when an ordinary member tries it.

Moderation template with permission checks in the BotFrame workflow editor

What happens in Discord

Example interaction

Member action
/clear amount: 5
Bot behavior
Checks the member’s Manage Messages permission, removes eligible recent messages if allowed, then confirms the action.
  1. /clear with an amount
  2. Check Manage Messages
  3. Allowed: purge and reply
  4. Denied: explain the permission requirement

Choose it during setup

Create a workspace and select Moderation commands on the template screen. Connect your own Discord bot, deploy it, then choose Add bot to server. The link below opens workspace setup; it does not preselect a template.

All six quick-start templates can deploy on Free, within its one-bot, one-server and 5,000 monthly workflow-run limits. Free bots use BotFrame branding. Editing a template can introduce paid features; check deployment eligibility after changing it.

Settings worth checking

Moderation commands: configuration
SettingWhat to check
AmountA required whole number from 1 to 100, connected to the Purge messages count.
Permission checkChecks the member using the command. The bot also needs its own Manage Messages permission.
BranchesOnly the true branch reaches Purge messages. The false branch sends a denial reply.
Message ageBulk deletion is limited to recent messages. Messages older than 14 days can remain.

Check these outcomes

Moderation commands: test checklist
Try thisExpected outcome
Moderator clears recent messagesPurge messages runs and the command gets a confirmation.
Ordinary member requests 100 messagesThe denial reply runs and Purge messages does not.
The bot lacks Manage MessagesThe action fails even if the member is a moderator.
Old messages are presentDo not expect /clear to remove messages older than 14 days.

Use the simulator walkthrough to check the flow before trying it in a test server. A simulated result does not confirm the live bot’s Discord access.

What this template does not do

This template is a clear command, not a full moderation suite. It does not include bans, timeouts, warning histories or appeal handling. Deletions affect real messages: first test in a disposable channel.

Make it yours

Add a moderation log after the successful action, or a stricter role check before it. Preserve the denied branch whenever you edit the flow.

Open the node references: Member has permission · Condition · Purge messages · Send message.

Follow the setup walkthrough