---
title: "Command: `ban`"
short_name: ban
---

import Modes from "@/components/MDX/Modes";

# `ban`

Bans a user from the server. Doesn't matter if the user is in the server or not.
If the user is in the server, they will receive a DM notice from the bot telling them that they were banned, with the given reason.

### Syntax

```
-ban <user_mention|user_id> [reason]
-ban <user_mention|user_id> [message_deletion_timeframe=0s] [reason]
```

### Required Permissions

`ADMINISTRATOR` or `BAN_MEMBERS`

### Modes

<Modes modes={["legacy", "interaction"]} />

### Examples

```
-ban @Someone Violating rules
-ban 84465685652367452 7d Violating rules
```
