filters

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T Filterable](callable func(*gobotapi.Client, T), operands FilterOperand) func(*gobotapi.Client, T)

Types

type DataFilter

type DataFilter struct {
	Chat      *types.Chat
	Date      *int64
	From      *types.User
	Message   *types.MaybeInaccessibleMessage
	Client    *gobotapi.Client
	RawUpdate any
}

type FilterOperand

type FilterOperand func(options *DataFilter) bool

func And

func And(options ...FilterOperand) FilterOperand

func AntiFlood

func AntiFlood(numEvents int, inTime time.Duration, banTime time.Duration) FilterOperand

func ChatID

func ChatID(idList ...int64) FilterOperand

func Command

func Command(command string, aliasList ...string) FilterOperand

func Commands

func Commands(command []string, aliasList ...string) FilterOperand

func Group

func Group() FilterOperand

func Not

func Not(option FilterOperand) FilterOperand

func Or

func Or(options ...FilterOperand) FilterOperand

func Private

func Private() FilterOperand

func SuperGroup

func SuperGroup() FilterOperand

func UserID

func UserID(idList ...int64) FilterOperand

Jump to

Keyboard shortcuts

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