package telegraml

  1. Overview
  2. Docs

Used to represent private messages, groupchats, and other types of Telegram chats

type chat_type =
  1. | Private
  2. | Group
  3. | Supergroup
  4. | 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 = {
  1. id : int;
  2. chat_type : chat_type;
  3. title : string option;
  4. username : string option;
  5. first_name : string option;
  6. 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

Read a chat out of some JSON

OCaml

Innovation. Community. Security.