Guilds

Ban guild member

Ban guild member. Requires ban_members permission. Prevents user from joining; optionally deletes recent messages and sets ban expiry duration.

put/guilds/{guild_id}/bans/{user_id}

Path parameters

guild_idstring snowflake required

The ID of the guild

user_idstring snowflake required

The ID of the user

Request body

delete_message_daysinteger

Number of days of messages to delete from the banned user (0-7). Deprecated in favor of delete_message_seconds.

delete_message_secondsinteger

Number of seconds of messages to delete for the banned user (0-604800, default 0)

reasonstring nullable

The reason for the ban (max 512 characters)

ban_duration_secondsinteger

Duration of the ban in seconds (0 for permanent, or between 60 and 63072000 seconds for a temporary ban)

Response

No Content

Changes

No recorded changes to this endpoint across all 1 revision of this API.