bot

package
v0.0.0-...-5088ca0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	database.Module,

	fx.Provide(NewRemake),
	fx.Provide(NewMessageCounter),
	fx.Provide(NewHandler),
	fx.Invoke(func(handler *Handler) {
		handler.RegisterAll()
	}),
)

Functions

func NewRemakeBot

func NewRemakeBot(lc fx.Lifecycle, logger *zap.Logger) *tele.Bot

Types

type Country

type Country struct {
	CountryName string `json:"country"`
	Population  int64  `json:"population"`
}

type Handler

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

func NewHandler

func NewHandler(bot *tele.Bot, logger *zap.Logger, remake *Remake, counter *MessageCounter) *Handler

func (*Handler) CommandMsgStats

func (h *Handler) CommandMsgStats(c tele.Context) error

func (*Handler) CommandOnSticker

func (h *Handler) CommandOnSticker(c tele.Context) error

func (*Handler) CommandOnText

func (h *Handler) CommandOnText(c tele.Context) error

func (*Handler) CommandRemake

func (h *Handler) CommandRemake(c tele.Context) error

func (*Handler) CommandRemakeData

func (h *Handler) CommandRemakeData(c tele.Context) error

func (*Handler) InlineQuery

func (h *Handler) InlineQuery(c tele.Context) error

func (*Handler) RegisterAll

func (h *Handler) RegisterAll()

type MessageCounter

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

func NewMessageCounter

func NewMessageCounter(db *sql.DB) *MessageCounter

func (*MessageCounter) GetCount

func (mc *MessageCounter) GetCount(userID int64) (int, error)

func (*MessageCounter) GetTopUserInLast24Hours

func (mc *MessageCounter) GetTopUserInLast24Hours() (int64, int, error)

func (*MessageCounter) Increment

func (mc *MessageCounter) Increment(telegramID int64) error

type Remake

type Remake struct {
	CountryList     []Country
	TotalPopulation int64
	RemakeCount     map[int64]*RemakeData
}

func NewRemake

func NewRemake() *Remake

type RemakeData

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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