---
title: /tempban
description: Temporarily ban a user.
---
## Overview

`/tempban` bans a user for a set duration. The ban is automatically removed when the time expires.

## Required Permissions

- **Ban Members**

## Options

| Option | Required | Description |
|--------|----------|-------------|
| `user` | Yes | User to tempban |
| `duration` | Yes | Duration, e.g. `1d`, `7d`, `2w` |
| `reason` | No | Reason for the tempban |
| `deletemessages` | No | Delete messages from last 0–7 days (default: 0) |

## Behavior

- The user is unbanned automatically when the duration ends.
- The user receives a DM with duration, expiry time, and an Appeal button (if appeals are enabled).
- Bots cannot be tempbanned.
- A case is created and logged if a log channel is set.