Documentation
¶
Overview ¶
Package tgutil provides small constructors for common Telegram Bot API values.
Index ¶
- func CallbackButton(text, callbackData string) tgbot.InlineKeyboardButton
- func FileFromBytes(name string, data []byte) tgbot.InputFile
- func InlineKeyboard(rows ...[]tgbot.InlineKeyboardButton) *tgbot.InlineKeyboardMarkup
- func InlineKeyboardRow(buttons ...tgbot.InlineKeyboardButton) []tgbot.InlineKeyboardButton
- func NewMessage(chatID any, text string) *tgbot.SendMessageParams
- func URLButton(text, url string) tgbot.InlineKeyboardButton
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackButton ¶
func CallbackButton(text, callbackData string) tgbot.InlineKeyboardButton
CallbackButton creates an inline keyboard button containing callback data.
func FileFromBytes ¶
FileFromBytes creates an upload backed by data.
func InlineKeyboard ¶
func InlineKeyboard(rows ...[]tgbot.InlineKeyboardButton) *tgbot.InlineKeyboardMarkup
InlineKeyboard creates an inline keyboard from rows of buttons.
func InlineKeyboardRow ¶
func InlineKeyboardRow(buttons ...tgbot.InlineKeyboardButton) []tgbot.InlineKeyboardButton
InlineKeyboardRow creates one row of inline keyboard buttons.
func NewMessage ¶
func NewMessage(chatID any, text string) *tgbot.SendMessageParams
NewMessage creates the parameters for a plain text message.
func URLButton ¶
func URLButton(text, url string) tgbot.InlineKeyboardButton
URLButton creates an inline keyboard button that opens a URL.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.