AI Integration Quick Reference
AI Integration Quick Reference
- Kick a member from the group
- Ban a member from the group
- Unban a member from the group
- Update the scope of the member of the group
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
With offline support on, this filter is answered by the server only; the cached page is empty.
- 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.
Set Scopes
Filters banned members by one or more scopes (admin, moderator, participant).
- TypeScript
- JavaScript
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:
Offline Behaviour
With offline support enabled,BannedMembersRequest.fetchNext() accepts a BannedMemberFetchListener and first delivers onCachedBannedGroupMembers from the device (empty when nothing was recorded), then onServerBannedGroupMembers with the live page to reconcile by uid. Offline, the read ends with onError with code FAILED_TO_FETCH after the cached page. A request that uses a server-only filter records nothing, so its cached page is always empty. See Show Cached Data.
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