bot

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricLabelActionMessageProcessed MetricLabelAction = "message_processed"
	MetricLabelActionMessageDeleted   MetricLabelAction = "message_deleted"
	MetricLabelActionUserBanned       MetricLabelAction = "user_banned"
	MetricLabelActionAdminNotified    MetricLabelAction = "admin_notified"

	MetricLabelStatusSuccess MetricLabelStatus = "success"
	MetricLabelStatusFailed  MetricLabelStatus = "failed"
)

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Types

type Bot added in v0.3.2

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

func New added in v0.3.2

func New(cfg Config, censor *censor.Service, storage *storage.Storage, metrics *Metrics, logger *zap.Logger) *Bot

func (*Bot) Handler added in v0.4.0

func (b *Bot) Handler(ctx context.Context, bot *tgbotapifx.Bot, update tgbotapi.Update) error

type Config added in v0.4.0

type Config struct {
	AdminID      int64
	BanThreshold uint8
}

type MetricLabelAction added in v0.4.0

type MetricLabelAction string

type MetricLabelStatus added in v0.4.0

type MetricLabelStatus string

type Metrics added in v0.4.0

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

func NewMetrics added in v0.4.0

func NewMetrics() *Metrics

func (*Metrics) IncProcessedAction added in v0.4.0

func (m *Metrics) IncProcessedAction(action MetricLabelAction, status MetricLabelStatus)

Jump to

Keyboard shortcuts

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