Flow reference: Plugins

Anti-Nuke: Guard

Find who did it in the audit log and trip when they exceed the limit.

Find who did it in the audit log and trip when they exceed the limit.

When and how to use it

Connect the input from the preceding step on the path that should perform this operation.
Fill the fields with data available in the trigger's context.
Connect the needed outputs; an unconnected path cannot run later blocks.

Configuration fields

Watched action — action


Choose whether this block adds, lists, removes or guards an item. Fill the identifiers required by that action.

Input: Fixed choice.

Default: channel-delete.

Available choices (preserve the exact value):
channel-delete — Channel deleted
channel-create — Channel created
role-delete — Role deleted
role-create — Role created
member-ban — Member banned
member-kick — Member kicked


Limit (actions) — limit


Maximum count returned or allowed by this operation. For a guard, combine it with the time window; for a list, keep output readable.

Input: Number.

Default: 3.


Time window (seconds) — windowSeconds


Observation window in seconds for counting suspicious actions. Tune together with the action limit and trusted whitelist.

Input: Number.

Default: 10.


Whitelist (user / role IDs) — whitelist


Only add trusted identities in the format shown. A broad whitelist can disable the intended protection.

Input: Text.

Editor guidance: Comma separated. Owner and the bot are always trusted.

Default: {env.ANTINUKE_WHITELIST}.

Outputs and next steps

triggered: The guard detected a violation; review the intended punishment path.
safe: The guard did not detect a threshold violation.

Test and troubleshoot

Install the corresponding plugin and configure its required accounts, channels and secrets. Test an API read before a write operation. An external-service error is not a reason to recreate the whole bot.

Save, validate and publish. Perform one real test and read the first relevant log error. [Testing](/docs/flow-testing) · [Variables](/docs/flow-variables) · [Permissions](/docs/flow-permissions).