AI Integration Quick Reference
AI Integration Quick Reference
Message categories and types:
- message →
text,image,video,audio,file - custom → Developer-defined types (e.g.,
location,poll) - action →
groupMember(joined/left/kicked/banned),message(edited/deleted) - call →
audio,video
message, custom, action, call) and has a specific type within that category.
Message Hierarchy

Categories Overview
| Category | Types | Description |
|---|---|---|
message | text, image, video, audio, file | Standard user messages |
custom | Developer-defined | Custom data (location, polls, etc.) |
action | groupMember, message | System-generated events |
call | audio, video | Call-related messages |
Checking Message Category and Type
UsegetCategory() and getType() to determine how to handle a received message:
- TypeScript
- JavaScript
Standard Messages (message Category)
Messages with category message are standard user-sent messages:
| Type | Description |
|---|---|
text | Plain text message |
image | Image attachment |
video | Video attachment |
audio | Audio attachment |
file | File attachment |
Custom Messages (custom Category)
Custom messages allow you to send data that doesn’t fit the default categories. You define your own type to identify the message (e.g., location, poll, sticker).
Action Messages (action Category)
Action messages are system-generated events. They have a type and an action property:
Type: groupMember — Actions on group members:
joined— Member joined the groupleft— Member left the groupkicked— Member was kickedbanned— Member was bannedunbanned— Member was unbannedadded— Member was addedscopeChanged— Member’s scope was changed
message — Actions on messages:
edited— Message was editeddeleted— Message was deleted
Call Messages (call Category)
Call messages track call events with types audio or video. The status property indicates the call state:
| Status | Description |
|---|---|
initiated | Call started |
ongoing | Call accepted and in progress |
canceled | Caller canceled |
rejected | Receiver rejected |
unanswered | No answer |
busy | Receiver on another call |
ended | Call completed |
Next Steps
Send Messages
Send text, media, and custom messages
Receive Messages
Listen for incoming messages in real time
Message Filtering
Advanced message filtering with RequestBuilder