commands

package
v0.0.0-...-0e4e588 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWisdomUserPattern

func GetWisdomUserPattern(userId int64) (string, error)

Types

type AntonCmd

type AntonCmd struct {
	WisdomCmd
}

func (AntonCmd) Match

func (c AntonCmd) Match(cmd *tgbotapi.Message) bool

type CommandHandler

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

func GetHandler

func GetHandler(db *sql.DB, bot *tgbotapi.BotAPI) CommandHandler

func (CommandHandler) Handle

func (h CommandHandler) Handle(cmd *tgbotapi.Message)

type CommandInterface

type CommandInterface interface {
	Match(cmd *tgbotapi.Message) bool
	Execute(cmd *tgbotapi.Message)
}

type DKCmd

type DKCmd struct {
	WisdomCmd
}

func (DKCmd) Match

func (c DKCmd) Match(cmd *tgbotapi.Message) bool

type EUWisdomCmd

type EUWisdomCmd struct {
	WisdomCmd
}

func (EUWisdomCmd) Match

func (c EUWisdomCmd) Match(cmd *tgbotapi.Message) bool

type HagzorCmd

type HagzorCmd struct {
	WisdomCmd
}

func (HagzorCmd) Match

func (c HagzorCmd) Match(cmd *tgbotapi.Message) bool

type StatCmd

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

func (StatCmd) Execute

func (c StatCmd) Execute(cmd *tgbotapi.Message)

func (StatCmd) Match

func (c StatCmd) Match(cmd *tgbotapi.Message) bool

type TopCmd

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

func (TopCmd) Execute

func (c TopCmd) Execute(cmd *tgbotapi.Message)

func (TopCmd) Match

func (c TopCmd) Match(cmd *tgbotapi.Message) bool

type WisdomCmd

type WisdomCmd struct {
	AuthorId string
	UserName string
	// contains filtered or unexported fields
}

func (WisdomCmd) Execute

func (c WisdomCmd) Execute(cmd *tgbotapi.Message)

func (WisdomCmd) Match

func (c WisdomCmd) Match(cmd *tgbotapi.Message) bool

Jump to

Keyboard shortcuts

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