You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
574 B

package entity
import "github.com/gotd/td/tg"
// Formatter is a message entity constructor.
type Formatter func(offset, limit int) tg.MessageEntityClass
// Plain formats message as plain text.
func (b *Builder) Plain(s string) *Builder {
_, _ = b.WriteString(s)
b.lastFormatIndex = len(b.entities)
return b
}
// Format formats message using given formatters.
func (b *Builder) Format(s string, formats ...Formatter) *Builder {
return b.appendMessage(s, formats...)
}
//go:generate go run github.com/gotd/td/telegram/message/internal/mkentity -output options.gen.go