discord_ban_member
Ban a user from a Discord server, blocking re-entry until unbanned, with an option to delete their recent messages.
Instructions
Ban a user from the server, blocking re-entry until unbanned. Optionally bulk-deletes their recent messages. Requires the Ban Members permission, and the bot's top role must outrank the target's. Use discord_unban_member to reverse, or discord_kick_member for a non-permanent removal. The reason is recorded in the audit log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guild_id | Yes | Discord server (guild) ID (snowflake). | |
| user_id | Yes | Discord user ID (snowflake) of the user to ban. | |
| reason | No | Optional reason recorded in the server audit log. | |
| delete_message_days | No | Also delete the user's messages from the last N days (0–7). Default 0 (delete nothing). |