AntiRaidAntiRaid

Ban

Permanently ban a member and optionally delete their recent messages.

Updated April 11, 2026

Use /moderation ban to permanently ban a user from the server. Banned users cannot rejoin unless explicitly unbanned.

Usage

/moderation ban user:@username reason:[reason]

Requires both the moderation.ban permission node and the Discord Ban Members permission.

Ban command

Parameters

PropTypeDescription
user
user
The user to ban (mention or ID). Does not need to be in the server.
reason?
string
The reason for the ban. Recorded in moderation logs.
delete_message_days?
integer
Delete this many days of the user's recent messages (0–7).
delete_message_seconds?
integer
Delete this many seconds of the user's recent messages. Alternative to delete_message_days.

Notes

  • Always provide a reason — it makes reviewing moderation logs much easier later
  • You can ban users who are not currently in the server using their user ID
  • The action is logged with your name, the target user, reason, and timestamp
  • Server owners cannot be banned