bot

package
v0.0.0-...-7a40845 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallbackQueryData

func CallbackQueryData(data string) filters.FilterOperand

func IsBackupFile

func IsBackupFile() filters.FilterOperand

Types

type Bot

type Bot struct {
	Api *gobotapi.PollingClient
	// contains filtered or unexported fields
}

func NewBot

func NewBot(cfg *config.Config, dbCtx *db.DB, torClient *tor.Client) (*Bot, error)

func (*Bot) IfElse

func (b *Bot) IfElse(handler, handlerElse func(*core.UpdateContext, types.Message) error, filterCondition filters.FilterOperand) func(*core.UpdateContext, types.Message) error

func (*Bot) OnAdminCommand

func (b *Bot) OnAdminCommand(command string, handler func(*core.UpdateContext, types.Message) error, extraFilters ...filters.FilterOperand)

func (*Bot) OnAdminMessage

func (b *Bot) OnAdminMessage(handler func(*core.UpdateContext, types.Message) error, extraFilters ...filters.FilterOperand)

func (*Bot) OnAdminTextCommand

func (b *Bot) OnAdminTextCommand(key translator.Key, handler func(*core.UpdateContext, types.Message) error, extraFilters ...filters.FilterOperand)

func (*Bot) OnCallbackQuery

func (b *Bot) OnCallbackQuery(data string, handler func(*core.UpdateContext, types.CallbackQuery) error, extraFilters ...filters.FilterOperand)

func (*Bot) OnCommand

func (b *Bot) OnCommand(command string, handler func(*core.UpdateContext, types.Message) error, extraFilters ...filters.FilterOperand)

func (*Bot) OnMessage

func (b *Bot) OnMessage(handler func(*core.UpdateContext, types.Message) error, extraFilters ...filters.FilterOperand)

func (*Bot) OnTextCommand

func (b *Bot) OnTextCommand(key translator.Key, handler func(*core.UpdateContext, types.Message) error, extraFilters ...filters.FilterOperand)

func (*Bot) Start

func (b *Bot) Start() error

Jump to

Keyboard shortcuts

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