message

package
v0.0.0-...-a1d4fde Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Msg      tgbotapi.MessageConfig
	Keyboard tgbotapi.ReplyKeyboardMarkup
}

Content is a content type for markdown.

func NewHTMLContent

func NewHTMLContent(msg tgbotapi.MessageConfig, text string) *Content

NewHTMLContent returns the HTML representation of the content.

func NewMdContent

func NewMdContent(msg tgbotapi.MessageConfig, text string) *Content

NewMdContent returns a new Content.

func NewMdV2Content

func NewMdV2Content(msg tgbotapi.MessageConfig, text string) *Content

NewMdV2Content returns the MarkdownV2 representation of the content.

func (*Content) GetMsg

func (c *Content) GetMsg() tgbotapi.MessageConfig

GetMsg returns the message.

type Message

type Message struct {
	Message        tgbotapi.MessageConfig
	Keyboard       keyboard.Keyboard
	InlineKeyboard keyboard.InlineKeyboard
	RemoveKeyboard tgbotapi.ReplyKeyboardRemove
}

func NewMessage

func NewMessage(update tgbotapi.Update) *Message

func (*Message) Command

func (m *Message) Command() string

func (*Message) HandleCommand

func (m *Message) HandleCommand(pattern string, handler func(msg *Message))

func (*Message) HandleText

func (m *Message) HandleText(pattern string, handler func(msg *Message))

func (*Message) IsCommand

func (m *Message) IsCommand() bool

func (*Message) NewButton

func (m *Message) NewButton(button keyboard.Button) *Message

func (*Message) NewInlineButton

func (m *Message) NewInlineButton(inlineButton keyboard.InlineButton) *Message

func (*Message) NewInlineKeyboard

func (m *Message) NewInlineKeyboard() *Message

func (*Message) NewInlineKeyboardRow

func (m *Message) NewInlineKeyboardRow() *Message

func (*Message) NewKeyboardRow

func (m *Message) NewKeyboardRow() *Message

func (*Message) NewRemoveKeyboard

func (m *Message) NewRemoveKeyboard() *Message

func (*Message) NewReplyKeyboard

func (m *Message) NewReplyKeyboard() *Message

func (*Message) SetText

func (m *Message) SetText(text string) *Message

Jump to

Keyboard shortcuts

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