styling

package
v0.107.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 4 Imported by: 41

Documentation

Overview

Package styling contains styling options for Telegram messages.

Code generated by mkentity, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Perform

func Perform(builder *entity.Builder, texts ...StyledTextOption) error

Perform performs all options to the given builder.

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, collapsed bool) 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 Plain

func Plain(s string) StyledTextOption

Plain formats text without any entities.

func Pre

func Pre(s string, language string) StyledTextOption

Pre formats text as Pre entity.

See https://core.telegram.org/constructor/messageEntityPre.

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 URL

func URL(s string) StyledTextOption

URL formats text as URL entity.

See https://core.telegram.org/constructor/messageEntityUrl.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL