telegram

package
v0.0.0-...-1cee8e5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBot

func NewBot(b TbBot) bot.TelegramBot

Types

type Bot

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

func (*Bot) GetFile

func (b *Bot) GetFile(fileID string) (io.ReadCloser, error)

func (*Bot) Handle

func (b *Bot) Handle(endpoint string, handler bot.TelegramHandler)

func (*Bot) Send

func (b *Bot) Send(to string, what interface{}, options ...interface{}) error

func (*Bot) SetCommands

func (b *Bot) SetCommands(commands []bot.TelegramBotCommand) error

func (*Bot) Start

func (b *Bot) Start()

func (*Bot) Stop

func (b *Bot) Stop()

type TbBot

type TbBot interface {
	Start()
	Stop()
	SetCommands(opts ...interface{}) error
	Handle(endpoint interface{}, h tb.HandlerFunc, m ...tb.MiddlewareFunc)
	Send(to tb.Recipient, what interface{}, opts ...interface{}) (*tb.Message, error)
	File(file *tb.File) (io.ReadCloser, error)
	FileByID(fileID string) (tb.File, error)
}

Jump to

Keyboard shortcuts

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