Ban member
ban_memberBan a user from a Discord server, optionally deleting their recent messages. Preview the action first, then confirm to execute.
Instructions
Ban a user from the server, optionally deleting their recent messages. Works on users who already left (pass their user ID). Safe to call directly: the first call changes nothing and returns a preview plus a confirm_token; repeating the call with the token performs the ban. Relay the preview for the user's go-ahead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | Member name, or a user ID for someone not in the server. | |
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| reason | No | ||
| delete_message_seconds | No | Also delete their messages from the last N seconds, up to 604800 (7 days). | |
| dry_run | No | ||
| confirm_token | No |