biz

package
v0.0.0-...-3765fb9 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	*pg.DB
	*gocaptcha.ImageConfig
	*gocaptcha.ImageFilterManager
	IdiomCount int
}

func NewHandler

func NewHandler(db *pg.DB, cfg env.Specification) Handler

func (Handler) BotEnterGroup

func (Handler) BotEnterGroup(*tgbotapi.BotAPI, *tgbotapi.Chat) error

func (Handler) GetRandomIdiom

func (h Handler) GetRandomIdiom() (*model.Idiom, error)

func (Handler) NewMemberInGroup

func (h Handler) NewMemberInGroup(bot *tgbotapi.BotAPI, chat *tgbotapi.Chat, user tgbotapi.User) error

func (Handler) OnCallbackQuery

func (h Handler) OnCallbackQuery(bot *tgbotapi.BotAPI, query tgbotapi.CallbackQuery) error

func (Handler) OnGroupMsg

func (h Handler) OnGroupMsg(bot *tgbotapi.BotAPI, msg tgbotapi.Message) error

func (Handler) OnMemberLeftGroup

func (h Handler) OnMemberLeftGroup(bot *tgbotapi.BotAPI, chat *tgbotapi.Chat, user tgbotapi.User) error

func (Handler) OnPrivateCommand

func (h Handler) OnPrivateCommand(bot *tgbotapi.BotAPI, msg tgbotapi.Message, command string, args ...string) error

type IBiz

type IBiz interface {
	BotEnterGroup(*tgbotapi.BotAPI, *tgbotapi.Chat) error
	NewMemberInGroup(*tgbotapi.BotAPI, *tgbotapi.Chat, tgbotapi.User) error
	OnGroupMsg(*tgbotapi.BotAPI, tgbotapi.Message) error
	OnCallbackQuery(*tgbotapi.BotAPI, tgbotapi.CallbackQuery) error
	OnMemberLeftGroup(*tgbotapi.BotAPI, *tgbotapi.Chat, tgbotapi.User) error
	OnPrivateCommand(bot *tgbotapi.BotAPI, msg tgbotapi.Message, command string, args ...string) error
}

Jump to

Keyboard shortcuts

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