tgutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package tgutil provides small constructors for common Telegram Bot API values.

Index

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

func FileFromBytes(name string, data []byte) tgbot.InputFile

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.

Jump to

Keyboard shortcuts

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