package telegraml

  1. Overview
  2. Docs

Used to represent formatting options for a message's text

type entity_type =
  1. | Mention
  2. | Hashtag
  3. | BotCommand
  4. | Url
  5. | Email
  6. | Bold
  7. | Italic
  8. | Code
  9. | Pre
  10. | TextMention of User.user

The type of formatting to apply to the text

val entity_type_of_string : string option -> User.user option -> string -> entity_type

Takes the url and user fields of the record and the type field, then creates a value of type entity_type based on that

type message_entity = {
  1. entity_type : entity_type;
  2. offset : int;
  3. length : int;
}

Represents the message entity inside of the message

val create : entity_type:entity_type -> offset:int -> length:int -> unit -> message_entity

Create a message_entity in a concise manner

Read a message_entity out of some JSON

val read : Yojson.Safe.json -> message_entity

Read a message_entity out of some JSON

OCaml

Innovation. Community. Security.