Documentation ¶
Overview ¶
Package styling contains styling options for Telegram messages.
Code generated by mkentity, DO NOT EDIT.
Index ¶
- func Perform(builder *entity.Builder, texts ...StyledTextOption) error
- type StyledTextOption
- func BankCard(s string) StyledTextOption
- func Blockquote(s string) StyledTextOption
- func Bold(s string) StyledTextOption
- func BotCommand(s string) StyledTextOption
- func Cashtag(s string) StyledTextOption
- func Code(s string) StyledTextOption
- func Custom(cb func(eb *entity.Builder) error) StyledTextOption
- func CustomEmoji(s string, documentID int64) StyledTextOption
- func Email(s string) StyledTextOption
- func Hashtag(s string) StyledTextOption
- func Italic(s string) StyledTextOption
- func Mention(s string) StyledTextOption
- func MentionName(s string, userID tg.InputUserClass) StyledTextOption
- func Phone(s string) StyledTextOption
- func Plain(s string) StyledTextOption
- func Pre(s string, language string) StyledTextOption
- func Spoiler(s string) StyledTextOption
- func Strike(s string) StyledTextOption
- func TextURL(s string, uRL string) StyledTextOption
- func URL(s string) StyledTextOption
- func Underline(s string) StyledTextOption
- func Unknown(s string) StyledTextOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StyledTextOption ¶
type StyledTextOption struct {
// contains filtered or unexported fields
}
StyledTextOption is an option for styling text.
func BankCard ¶
func BankCard(s string) StyledTextOption
BankCard formats text as BankCard entity.
See https://core.telegram.org/constructor/messageEntityBankCard.
func Blockquote ¶
func Blockquote(s string) StyledTextOption
Blockquote formats text as Blockquote entity.
See https://core.telegram.org/constructor/messageEntityBlockquote.
func Bold ¶
func Bold(s string) StyledTextOption
Bold formats text as Bold entity.
See https://core.telegram.org/constructor/messageEntityBold.
func BotCommand ¶
func BotCommand(s string) StyledTextOption
BotCommand formats text as BotCommand entity.
See https://core.telegram.org/constructor/messageEntityBotCommand.
func Cashtag ¶
func Cashtag(s string) StyledTextOption
Cashtag formats text as Cashtag entity.
See https://core.telegram.org/constructor/messageEntityCashtag.
func Code ¶
func Code(s string) StyledTextOption
Code formats text as Code entity.
See https://core.telegram.org/constructor/messageEntityCode.
func Custom ¶
func Custom(cb func(eb *entity.Builder) error) StyledTextOption
Custom formats text using given callback.
func CustomEmoji ¶ added in v0.63.0
func CustomEmoji(s string, documentID int64) StyledTextOption
CustomEmoji formats text as CustomEmoji entity.
See https://core.telegram.org/constructor/messageEntityCustomEmoji.
func Email ¶
func Email(s string) StyledTextOption
Email formats text as Email entity.
See https://core.telegram.org/constructor/messageEntityEmail.
func Hashtag ¶
func Hashtag(s string) StyledTextOption
Hashtag formats text as Hashtag entity.
See https://core.telegram.org/constructor/messageEntityHashtag.
func Italic ¶
func Italic(s string) StyledTextOption
Italic formats text as Italic entity.
See https://core.telegram.org/constructor/messageEntityItalic.
func Mention ¶
func Mention(s string) StyledTextOption
Mention formats text as Mention entity.
See https://core.telegram.org/constructor/messageEntityMention.
func MentionName ¶
func MentionName(s string, userID tg.InputUserClass) StyledTextOption
MentionName formats text as MentionName entity.
See https://core.telegram.org/constructor/inputMessageEntityMentionName.
func Phone ¶
func Phone(s string) StyledTextOption
Phone formats text as Phone entity.
See https://core.telegram.org/constructor/messageEntityPhone.
func Spoiler ¶ added in v0.54.0
func Spoiler(s string) StyledTextOption
Spoiler formats text as Spoiler entity.
See https://core.telegram.org/constructor/messageEntitySpoiler.
func Strike ¶
func Strike(s string) StyledTextOption
Strike formats text as Strike entity.
See https://core.telegram.org/constructor/messageEntityStrike.
func TextURL ¶
func TextURL(s string, uRL string) StyledTextOption
TextURL formats text as TextURL entity.
See https://core.telegram.org/constructor/messageEntityTextUrl.
func Underline ¶
func Underline(s string) StyledTextOption
Underline formats text as Underline entity.
See https://core.telegram.org/constructor/messageEntityUnderline.
func Unknown ¶ added in v0.54.0
func Unknown(s string) StyledTextOption
Unknown formats text as Unknown entity.
See https://core.telegram.org/constructor/messageEntityUnknown.
func (StyledTextOption) Zero ¶
func (s StyledTextOption) Zero() bool
Zero returns true if option is zero value.