BotFrame
Skip to content

Simulator walkthrough

A passing reply is not enough. Check what did not happen.

A moderation command must refuse an ordinary member without deleting messages. Use the Moderation commands template to test both outcomes and learn the difference between validation, simulation and a live Discord check.

Moderation reference cases open in the BotFrame simulator

Open the bottom bar

In the Workflow tab, choose Simulator at the bottom of the editor. The template includes a reference world and behavior checks. Keep those as a baseline while adding cases for your server. Validation is a separate panel in the same bar.

Give the test world meaningful permissions

Use a server, a channel with disposable messages, a moderator with Manage Messages and an ordinary member without it. The bot needs its own channel access and deletion permission. A world where everyone is an administrator cannot prove that your denied branch works.

Run these cases

Permission-boundary test plan
CaseActionExpected behavior
Allowed memberModerator uses /clear amount: 1Purge messages succeeds.
Denied memberOrdinary member uses /clear amount: 100A denial reply is sent; Purge messages does not occur.
Missing bot permissionRemove the bot’s Manage Messages permission and retry as moderatorThe purge action fails. The member’s authority cannot give the bot missing access.
Unrelated commandUse a different commandNo purge action occurs.

The template supplies the allowed, denied and unrelated-command reference cases. Add the missing-bot-permission case when adapting the workflow. Check the action results, not just whether a message was sent.

Read the failure before changing the graph

Failure diagnosis
Observed resultInvestigate
Denied member reaches Purge messagesThe permission result, Condition input and true/false flow connections.
Moderator is allowed but deletion failsThe bot’s permissions and the chosen channel in the test world.
A reply appears but no messages changeWhether the purge action ran, the test messages’ age and the target channel.
Simulation passes but live Discord failsDifferences in channel overrides, role order, bot configuration and deployed workflow.

Three checks answer different questions

Validation is not simulation
CheckQuestion answered
ValidationAre the graph’s settings and connections acceptable?
SimulationDoes it behave as expected in these specified cases and this test world?
Live testDoes the deployed bot have the real Discord access and configuration it needs?

Passing a test does not establish behavior that the case never exercises. After editing permissions, buttons or branches, rerun the affected cases and perform a small live test before relying on the bot in a busy channel.