Documentation ¶
Overview ¶
Package entity contains message formatting and styling helpers.
Index ¶
- type Builder
- func (b *Builder) BankCard(s string) *Builder
- func (b *Builder) Blockquote(s string) *Builder
- func (b *Builder) Bold(s string) *Builder
- func (b *Builder) BotCommand(s string) *Builder
- func (b *Builder) Cashtag(s string) *Builder
- func (b *Builder) Code(s string) *Builder
- func (b *Builder) Complete() (string, []tg.MessageEntityClass)
- func (b *Builder) Email(s string) *Builder
- func (b *Builder) GrowEntities(n int)
- func (b *Builder) GrowText(n int)
- func (b *Builder) Hashtag(s string) *Builder
- func (b *Builder) Italic(s string) *Builder
- func (b *Builder) Mention(s string) *Builder
- func (b *Builder) MentionName(s string, userID int) *Builder
- func (b *Builder) Phone(s string) *Builder
- func (b *Builder) Plain(s string) *Builder
- func (b *Builder) Pre(s, lang string) *Builder
- func (b *Builder) Strike(s string) *Builder
- func (b *Builder) TextURL(s, url string) *Builder
- func (b *Builder) URL(s string) *Builder
- func (b *Builder) Underline(s string) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds message string and text entities.
func (*Builder) BankCard ¶
BankCard formats message as formats message entity. See https://core.telegram.org/constructor/messageEntityBankCard.
func (*Builder) Blockquote ¶
Blockquote formats message as Blockquote message entity. See https://core.telegram.org/constructor/messageEntityBlockquote.
func (*Builder) Bold ¶
Bold formats message as Bold message entity. See https://core.telegram.org/constructor/messageEntityBold.
func (*Builder) BotCommand ¶
BotCommand formats message as BotCommand message entity. See https://core.telegram.org/constructor/messageEntityBotCommand.
func (*Builder) Cashtag ¶
Cashtag formats message as Cashtag message entity. See https://core.telegram.org/constructor/messageEntityCashtag.
func (*Builder) Code ¶
Code formats message as Code message entity. See https://core.telegram.org/constructor/messageEntityCode.
func (*Builder) Complete ¶
func (b *Builder) Complete() (string, []tg.MessageEntityClass)
Complete returns build result and resets builder.
func (*Builder) Email ¶
Email formats message as Email message entity. See https://core.telegram.org/constructor/messageEntityEmail.
func (*Builder) GrowEntities ¶
GrowEntities grows internal buffer capacity.
func (*Builder) Hashtag ¶
Hashtag formats message as Hashtag message entity. See https://core.telegram.org/constructor/messageEntityHashtag.
func (*Builder) Italic ¶
Italic formats message as Italic message entity. See https://core.telegram.org/constructor/messageEntityItalic.
func (*Builder) Mention ¶
Mention formats message as Mention message entity. See https://core.telegram.org/constructor/messageEntityMention.
func (*Builder) MentionName ¶
MentionName formats message as MentionName message entity. See https://core.telegram.org/constructor/messageEntityMentionName.
func (*Builder) Phone ¶
Phone formats message as Phone message entity. See https://core.telegram.org/constructor/messageEntityPhone.
func (*Builder) Pre ¶
Pre formats message as Pre message entity. See https://core.telegram.org/constructor/messageEntityPre.
func (*Builder) Strike ¶
Strike formats message as Strike message entity. See https://core.telegram.org/constructor/messageEntityStrike.
func (*Builder) TextURL ¶
TextURL formats message as TextUrl message entity. See https://core.telegram.org/constructor/messageEntityTextUrl.
func (*Builder) URL ¶
URL formats message as Url message entity. See https://core.telegram.org/constructor/messageEntityUrl.