bot

package
v0.0.0-...-2d279c2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 7 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 {
	AnswerInlineQuery(config tgbotapi.InlineConfig) (tgbotapi.APIResponse, error)
	Send(c tgbotapi.Chattable) (tgbotapi.Message, error)
}

type Chat

type Chat struct {
	ID         int64    `json:"id"`
	Aliases    []string `json:"aliases"`
	ChildChats []Chat   `json:"child_chats"`
}

type Config

type Config struct {
	Chats        []Chat   `json:"chats"`
	HelpContacts []string `json:"help_contacts"`
}

func (Config) AllAliases

func (config Config) AllAliases() []string

func (Config) AllChats

func (config Config) AllChats() []Chat

type Handler

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

func NewHandler

func NewHandler(config Config, bot BotAPI) *Handler

func (Handler) HandleUpdate

func (bh Handler) HandleUpdate(update tgbotapi.Update) error

Jump to

Keyboard shortcuts

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