tghandler

package
v0.0.0-...-517d227 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	b *tb.Bot,
	c tb.Context,
	cmd *parse.BotCommand,
	conf Config,
) _handler.Handler

New returns a new handler (Telegram) and appends it to SenderHandlers

Types

type ClientConfig

type ClientConfig struct {
	TimeoutSeconds int      `mapstructure:"timeout_seconds" json:"timeoutSeconds"`
	Verbose        bool     `mapstructure:"verbose" json:"verbose"`
	BotTokens      []string `mapstructure:"bot_tokens" json:"botTokens"`
}

type Config

type Config struct {
	Handler _handler.Config `mapstructure:"handler" json:"handler"`
	Client  ClientConfig    `mapstructure:"client" json:"client"`
}

Config for bot handlers. Mostly controls timing

Jump to

Keyboard shortcuts

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