telegram

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package telegram implements ui.ChatUI for Telegram bots using telebot v4.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Telegram

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

Telegram implements ui.ChatUI for the Telegram Bot API.

func New

func New(token string) (*Telegram, error)

New creates a Telegram bot UI with the given token. It starts long-polling in a background goroutine and returns immediately.

func (*Telegram) Close

func (t *Telegram) Close() error

Close stops the bot poller and waits for it to finish.

func (*Telegram) Receive

func (t *Telegram) Receive(ctx context.Context) (ui.Event, error)

Receive blocks until the next incoming event, context cancellation, or shutdown. It returns io.EOF when the bot is stopped.

Jump to

Keyboard shortcuts

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