AI Integration Quick Reference
AI Integration Quick Reference
Kick a Group Member
Admins or Moderators can remove a member usingkickGroupMember(). The kicked user can rejoin the group later.
- TypeScript
- JavaScript
kickGroupMember() takes the following parameters:
The kicked user will be no longer part of the group and can not perform any actions in the group, but the kicked user can rejoin the group.
On success, the method resolves with a
boolean value (true) confirming the operation.
Ban a Group Member
Admins or Moderators can ban a member usingbanGroupMember(). Unlike kicked users, banned users cannot rejoin until unbanned.
- TypeScript
- JavaScript
banGroupMember() method takes the following parameters:
The banned user will be no longer part of the group and can not perform any actions in the group. A banned user cannot rejoin the same group without being unbanned.
On success, the method resolves with a
boolean value (true) confirming the operation.
Unban a Group Member
Admins or Moderators can unban a previously banned member usingunbanGroupMember().
- TypeScript
- JavaScript
unbanGroupMember() method takes the following parameters
Once unbanned, the user can rejoin the group.
On success, the method resolves with a
boolean value (true) confirming the operation.
Get List of Banned Members for a Group
UseBannedMembersRequestBuilder to fetch banned members of a Group. The GUID must be specified in the constructor.
Set Limit
Sets the number of banned members to fetch per request.- TypeScript
- JavaScript
Set Search Keyword
Filters banned members by a search string.With offline support on, this filter is answered by the server only; the cached page is empty.
- TypeScript
- JavaScript
Set Scopes
Filters banned members by one or more scopes (admin, moderator, participant).
- TypeScript
- JavaScript
build() to create the request, then fetchNext() to retrieve banned members.
- TypeScript
- JavaScript
fetchNext() method returns an array of GroupMember objects representing the banned members of the group.
Offline Behaviour
With offline support enabled, passing aBannedGroupMemberFetchListener to BannedMembersRequest.fetchNext() calls onCachedBannedGroupMembers first with the pages the server last returned for this exact request, replayed from the device (empty when nothing was recorded). Then onServerBannedGroupMembers delivers the live page to reconcile by uid. Offline, the read ends with onError (FAILED_TO_FETCH) after the cached page, and the Promise rejects. A request that uses a server-only filter records nothing, so its cached page is always empty. See Show Cached Data.
Real-Time Kick/Ban/Unban Events
Implement theseGroupListener methods to receive real-time notifications:
- TypeScript
- JavaScript
Missed Group Member Kicked/Banned Events
When fetching previous messages, kick/ban/unban actions appear as Action messages (a subclass ofBaseMessage).
Kicked event:
Banned event:
Unbanned event:
Next Steps
Add Members
Add new members to a group
Change Member Scope
Promote or demote group members
Retrieve Group Members
Fetch the list of members in a group
Leave a Group
Allow members to leave a group