Skip to main content

Moderation

Warning, timing out, kicking and banning, with a numbered case behind each one.

Module: moderation.

The commands​

/warn member: @Ada reason: <why>
/timeout member: @Ada duration: 30m reason: <why>
/untimeout member: @Ada
/kick member: @Ada reason: <why>
/ban user: @Ada reason: <why>
/unban user_id: <id> reason: <why>
/softban member: @Ada delete_days: 1
/purge count: 20

/softban bans and immediately unbans, which clears somebody's recent messages without keeping them out. It is the tool for a spam wave, not for a person you want gone.

/purge deletes recent messages in the channel you run it in.

/ban takes an optional duration. Leave it off for permanent, set it and the bot lifts the ban itself when it expires.

Who can use them​

Server administrators, the admin role, and the Moderator role (moderation_role). Set the Moderator role in the dashboard under Moderation, or with /config set. If none is set, only administrators and the admin role can moderate, and the staff role does not stand in.

/purge also needs the Manage Messages permission in the channel you run it in, the same as deleting the messages by hand. The Moderator role alone is not enough. Chancery needs Manage Messages there too.

Every action gets a case number​

/case view
/case reason
/case history user: @Ada

Each case carries who did it, to whom, why, when, and whether it is still in force. /case reason corrects the wording afterwards, which matters because the reason is what an appeal is judged against.

The case is written before Discord is touched. A case with no ban behind it is a record of something that failed, and a moderator can see that. A ban with no case is a member who vanished and nobody can say who removed them or why.

What it refuses to do​

Anything you could not do by hand. Your top role is checked against the target's, and the bot's against theirs too. A junior moderator holding the command cannot ban somebody above them.

Acting on yourself, or on the bot.

People are told before they are removed​

A kicked or banned member cannot receive a DM afterwards, so the message goes out first. If it fails, the moderator is told it failed rather than assuming it landed. Somebody handling an appeal needs to know whether the person was ever informed.

Roles come back​

Turn on Give roles back (Moderation, then Rejoining, in the dashboard) and the bot remembers what somebody held when they left. Rejoin and they get it back.

Nothing is remembered for somebody who was kicked or banned, so they come back with no roles. @everyone and managed roles are left out. A managed role belongs to an integration, and handing one back would put somebody in a subscriber or bot role they no longer have. A role at or above the bot's own, or one that can ban, kick, time out, manage the server or administer, is not given back either. A person who was staff comes back as an ordinary member, and staff give the role again by hand.

No automod​

Chancery has no spam filter, invite blocking, banned-word list, mention-flood limit or raid detection. Discord's own AutoMod, in Server Settings, can block spam, mention floods and words you list.

It's not working​

"... is the same rank as you or higher, so this is not yours to do." They hold your top role or a higher one. Ask somebody above them.

"... is ranked above me. Move my role above theirs and try again." They are above the bot in the role list. Discord will not let the bot act on somebody higher than itself whatever permission you hold.

A ban worked but the case says it failed. The case is written first, so the row exists before Discord is called. If Discord then refused, the case records that rather than being deleted. Read the case rather than guessing from the member list.

A tempban did not lift. The bot lifts these itself on a timer. A restart at the wrong moment delays it to the next pass rather than losing it.

A timeout is still showing in a case after it expired. Discord expires timeouts itself, so the bot does not lift them and the case keeps its original end time. The member is not still timed out.

Somebody rejoined without their roles. Give roles back is off in that server, they were kicked or banned, or they held only managed roles or roles the bot will not hand out.

/purge deleted fewer messages than you asked for. Discord refuses to bulk-delete anything older than two weeks. Nothing is wrong; that is the limit.