Documentation
¶
Overview ¶
Package telegram provides a Telegram bot interface for Chronos agents.
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
}
Bot is a Telegram bot that receives messages via long polling and routes them to an agent.
func New ¶
func New(token string, handler MessageHandler) *Bot
New creates a new Telegram bot. token is the Telegram Bot API token from @BotFather. handler is called for each incoming message.
func (*Bot) SendInlineKeyboard ¶
func (b *Bot) SendInlineKeyboard(ctx context.Context, chatID int64, text string, buttons [][]Button) error
SendInlineKeyboard sends a message with an inline keyboard for HITL confirmations.
func (*Bot) SendMessage ¶
SendMessage sends a text message to a Telegram chat.
func (*Bot) WebhookHandler ¶
WebhookHandler returns an http.Handler for receiving Telegram webhook updates.
Click to show internal directories.
Click to hide internal directories.