Skip to main content

RichText

This is a boxed type (a TL class): the Go interface tg.RichTextClass, implemented by the constructors below. A value of this type is one of them — switch on the concrete type to handle it.

switch v := value.(type) {
case *tg.TextAnchor: // textAnchor
case *tg.TextAutoEmail: // textAutoEmail
case *tg.TextAutoPhone: // textAutoPhone
case *tg.TextAutoURL: // textAutoUrl
case *tg.TextBankCard: // textBankCard
case *tg.TextBold: // textBold
case *tg.TextBotCommand: // textBotCommand
case *tg.TextCashtag: // textCashtag
case *tg.TextConcat: // textConcat
case *tg.TextCustomEmoji: // textCustomEmoji
case *tg.TextDate: // textDate
case *tg.TextEmail: // textEmail
case *tg.TextEmpty: // textEmpty
case *tg.TextFixed: // textFixed
case *tg.TextHashtag: // textHashtag
case *tg.TextImage: // textImage
case *tg.TextItalic: // textItalic
case *tg.TextMarked: // textMarked
case *tg.TextMath: // textMath
case *tg.TextMention: // textMention
case *tg.TextMentionName: // textMentionName
case *tg.TextPhone: // textPhone
case *tg.TextPlain: // textPlain
case *tg.TextSpoiler: // textSpoiler
case *tg.TextStrike: // textStrike
case *tg.TextSubscript: // textSubscript
case *tg.TextSuperscript: // textSuperscript
case *tg.TextUnderline: // textUnderline
case *tg.TextURL: // textUrl
}

Constructors

ConstructorTL name
TextAnchortextAnchor
TextAutoEmailtextAutoEmail
TextAutoPhonetextAutoPhone
TextAutoURLtextAutoUrl
TextBankCardtextBankCard
TextBoldtextBold
TextBotCommandtextBotCommand
TextCashtagtextCashtag
TextConcattextConcat
TextCustomEmojitextCustomEmoji
TextDatetextDate
TextEmailtextEmail
TextEmptytextEmpty
TextFixedtextFixed
TextHashtagtextHashtag
TextImagetextImage
TextItalictextItalic
TextMarkedtextMarked
TextMathtextMath
TextMentiontextMention
TextMentionNametextMentionName
TextPhonetextPhone
TextPlaintextPlain
TextSpoilertextSpoiler
TextStriketextStrike
TextSubscripttextSubscript
TextSuperscripttextSuperscript
TextUnderlinetextUnderline
TextURLtextUrl

References