bot

package
v0.0.0-...-e50d8f5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandMessage

type CommandMessage interface {
	Handler() th.MessageHandlerCtx
	Predicates() []th.Predicate
}

func NewHandlerResponseLocation

func NewHandlerResponseLocation() CommandMessage

type CommandUpdate

type CommandUpdate interface {
	Handler() th.Handler
	Predicates() []th.Predicate
}

func NewHandlerFuture

func NewHandlerFuture(cli service.WeatherClient) CommandUpdate

func NewHandlerLocation

func NewHandlerLocation() CommandUpdate

func NewHandlerTodayWeather

func NewHandlerTodayWeather(cli service.WeatherClient) CommandUpdate

type Telegram

type Telegram interface {
	ResetWebhook()
	Setup() (*th.BotHandler, error)
	Start() error
	Stop(ctx context.Context) error
}

func New

func New(envs config.Envs, webhooker Webhooker) (Telegram, error)

type Webhooker

type Webhooker interface {
	URL() string
	Listener() net.Listener
	HasListener() bool
	Port() string
}

func WebhookerFactory

func WebhookerFactory(ctx context.Context, envs config.Envs) Webhooker

Jump to

Keyboard shortcuts

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