module Chat: sig .. end
Used to represent private messages, groupchats, and other types of Telegram chats
type chat_type =
| |
Private |
| |
Group |
| |
Supergroup |
| |
Channel |
The type of groupchat that the bot is in
val read_type : string -> chat_type
Turn a string into a chat_type
type chat = {
|
id : int; |
|
chat_type : chat_type; |
|
title : string option; |
|
username : string option; |
|
first_name : string option; |
|
last_name : string option; |
}
Represents a chat where messages can be sent or received
val create : id:int ->
chat_type:chat_type ->
?title:string option ->
?username:string option ->
?first_name:string option ->
?last_name:string option -> unit -> chat
Create a
chat in a concise manner
Read a chat out of some JSON
val read : Yojson.Safe.json -> chat