bot

package
v0.0.0-...-768bafe Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

func New

func New(l logger.Logger, botToken string) (*Bot, error)

func (*Bot) API

func (b *Bot) API() *telego.Bot

Api returns the underlying telego Bot instance.

func (*Bot) AnswerCallbackQuery

func (b *Bot) AnswerCallbackQuery(ctx context.Context, callbackQueryID string, text string) error

AnswerCallbackQuery answers a callback query.

func (*Bot) EditMessageText

func (b *Bot) EditMessageText(ctx context.Context, chatID int64, messageID int, text string, buttons [][]telego.InlineKeyboardButton) error

EditMessageText edits the text of a message.

func (*Bot) Name

func (b *Bot) Name() string

Name returns the service name.

func (*Bot) OnUpdate

func (b *Bot) OnUpdate() <-chan telego.Update

OnUpdate registers a handler for incoming updates.

func (*Bot) SendMessage

func (b *Bot) SendMessage(ctx context.Context, chatID int64, text string) error

SendMessage sends a message to a chat.

func (*Bot) SendMessageWithButtons

func (b *Bot) SendMessageWithButtons(ctx context.Context, chatID int64, text string, buttons [][]telego.InlineKeyboardButton) error

SendMessageWithButtons sends a message with inline keyboard buttons.

func (*Bot) Start

func (b *Bot) Start(ctx context.Context) error

Start starts the bot.

func (*Bot) Stop

func (b *Bot) Stop(ctx context.Context) error

Stop stops the bot.

Jump to

Keyboard shortcuts

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