MessageEntityFormat

telegramium.bots.high.messageentities.MessageEntityFormat
See theMessageEntityFormat companion object
sealed abstract class MessageEntityFormat extends Product, Serializable

Base class for different types of message entity formats that mirror the ones used by Telegram. Each format corresponds to a specific type of content in a message, such as mentions, hashtags, URLs, and more.

These formats can be used to wrap different parts of a message, which can then be composed to create a complete message. The benefits of this approach:

  • It automatically calculates the text offsets and lengths that are required by the Telegram Bot API.
  • It allows for generating the plain text of a message from the same source, simplifying the future message and formatting changes.

Note: This lower-level API is not typically used directly. Instead, most users should work with the MessageEntities API, which provides a higher-level, more user-friendly interface to the same functionality.

Attributes

See also
Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Bold
class BotCommand
class Cashtag
class Code
class CustomEmoji
class Email
class Hashtag
class Italic
class Mention
class PhoneNumber
class Plain
class Pre
class Spoiler
class TextLink
class TextMention
class Underline
class Url
Show all

Members list

Value members

Abstract methods

def text: String

Inherited methods

def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
def productArity: Int

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product
def productElementName(n: Int): String

Attributes

Inherited from:
Product
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def productPrefix: String

Attributes

Inherited from:
Product