events

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotAPI

type BotAPI interface {
	GetUpdatesChan(config tgbotapi.UpdateConfig) tgbotapi.UpdatesChannel
	Send(c tgbotapi.Chattable) (tgbotapi.Message, error)
}

type TelegramListener

type TelegramListener struct {
	BotAPI BotAPI
	Bots   bot.Interface
	Debug  bool
}

TelegramListener listens to tg update, forward to bots and send back responses Not thread safe

func (*TelegramListener) Do

func (l *TelegramListener) Do(ctx context.Context) (err error)

Do process all events, blocked call

Jump to

Keyboard shortcuts

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