Skip to main content

Overview

useBanMember returns a callable function for banning a member from a space by setting their status to "banned". Requires the caller to be a moderator or admin. Moderators can only ban regular members — banning an admin requires being the space creator, and the last remaining admin cannot be banned. A ban is a standing bar: the member stays out until someone calls useUnbanMember. It also cascades to the space’s child spaces and removes the member from the space chat.

Usage Example

Parameters

string
required
UUID of the space.
string
required
UUID of the membership record to ban.

Returns

string
Confirmation message.
SpaceMember
The updated membership record, with status set to "banned".
See also: useUnbanMember to reverse a ban, and useLeaveSpace for a member leaving voluntarily.