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.- 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.
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