Module Api.Chat

module Chat: sig .. end
Used to represent private messages, groupchats, and other types of Telegram chats

type chat_type = 
| Private
| Group
| Supergroup
| Channel (*
Turn a string into a `chat_type`
*)
The type of groupchat that the bot is in
val read_type : string -> 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

Create a `chat` in a concise manner

val create : id:int ->
chat_type:chat_type ->
?title:string option ->
?username:string option ->
?first_name:string option ->
?last_name:string option -> unit -> chat
Read a `chat` out of some JSON
val read : Yojson.Safe.json -> chat