/mod ban
Ban a user from the current server.
Availability
Section titled “Availability”Public source-edition command; execution remains conditional on installation, server policy and the running service. This reference is built from the repository, not a live Discord registration probe. Explicit registration contexts: server.
Syntax
Section titled “Syntax”/mod ban <user:User> [reason:String] [delete_days:Integer]Angle brackets indicate required input; square brackets indicate optional input. In Discord, choose the command and fill its named options, rather than typing the brackets.
Parameters
Section titled “Parameters”| Name | Type | Required | Allowed values / bounds | Default when omitted | Description |
|---|---|---|---|---|---|
user |
User | Yes | No registration choices declared; handler validation applies. | Required input | Target user to ban |
reason |
String | No | No registration choices declared; handler validation applies. | Rule violation / Disciplinary action. | Reason for the ban |
delete_days |
Integer | No | Min 0; Max 7 | 0 (do not delete recent messages) | Number of days of message history to delete (0 to 7) |
Permissions
Section titled “Permissions”Required native member permission(s): BanMembers (Administrator normally satisfies native permission checks).
Fork role access is evaluated using the underlying ban policy key, even when the slash name is grouped. Native Discord permission checks remain separate from Fork role grants. Sensitive commands fail closed before valid setup; native Administrator bypasses Fork’s role matrix, not Discord’s bot permissions or target hierarchy. See Permission model.
Where a member-targeting mutation calls the hierarchy guard, the server owner, the caller and Fork are protected. Targets must be below the acting moderator (except the owner) and Fork. Read-only history/list paths do not necessarily apply the same target guard. The bot needs the native permission required by the actual Discord action.
Examples
Section titled “Examples”/mod ban user:@Alex reason:Repeated rule violations delete_days:0Prefix equivalent and aliases
f!ban @Alex Repeated rule violations --delete-days 0Default prefix: f!; installations can configure another. Handler aliases: permaban. Aliases are prefix names, not additional slash commands. Handler-declared usage: f!ban @user [reason] [--delete-days 0..7].
Grouped prefix routes also delegate to the original handlers, but aliases retain that handler’s argument parsing. Conflicting aliases are rejected as ambiguous. Prefix replies are generally visible in the channel; prefer slash privacy controls for sensitive personal data.
Expected result
Section titled “Expected result”On a confirmed result, Discord applies the ban and Fork records the action. Optional recent-message deletion is independent and destructive.
Failure cases
Section titled “Failure cases”The owner, yourself, Fork and protected role hierarchy targets are refused. Bot permission or uncertain Discord outcomes can prevent confirmation. Check the returned error, current bot status and the relevant server permissions. A timeout or uncertain receipt is not proof that nothing happened; inspect state before repeating a mutation.
Usage limits
Section titled “Usage limits”No fixed command-specific cooldown is declared in this reviewed entry. Discord rate limits, provider budgets, service admission and server policy can still apply; this is not an unlimited-usage promise.
Related commands
Section titled “Related commands”Related guides
Section titled “Related guides”Source edition v1 · Registration, direct handler and shared authorization review are hash-bound in the local documentation validation. This is not a production feature-availability certification.