disabletg

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisableCore

type DisableCore interface {
	IsDisabled(chatID int64, command string) bool
	IsGlobalDisabled(command string) bool
}

type Disabler

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

func NewDisabler

func NewDisabler(dispatcher *ext.Dispatcher, config *DisablerConfig) *Disabler

func (*Disabler) ConsiderCaption

func (d *Disabler) ConsiderCaption() bool

func (*Disabler) ConsiderChannels

func (d *Disabler) ConsiderChannels() bool

func (*Disabler) ConsiderChannelsAndEdits

func (d *Disabler) ConsiderChannelsAndEdits() bool

func (*Disabler) ConsiderEdits

func (d *Disabler) ConsiderEdits() bool

func (*Disabler) GetGlobalIgnoredChats

func (d *Disabler) GetGlobalIgnoredChats() []int64

func (*Disabler) GetTriggers

func (d *Disabler) GetTriggers() []rune

func (*Disabler) IsDisabled

func (d *Disabler) IsDisabled(chatId int64, command string) bool

func (*Disabler) IsGlobalDisabled

func (d *Disabler) IsGlobalDisabled(command string) bool

func (*Disabler) IsGlobalIgnored

func (d *Disabler) IsGlobalIgnored(chatId int64) bool

func (*Disabler) IsInternalDisabled

func (d *Disabler) IsInternalDisabled(chatId int64, command string) bool

func (*Disabler) IsUsingInternals

func (d *Disabler) IsUsingInternals() bool

type DisablerConfig

type DisablerConfig struct {
	Edits             bool
	Channels          bool
	UseInternal       bool
	Caption           bool
	Triggers          []rune
	HandlerGroup      int
	GlobalIgnoreChats []int64
	Core              DisableCore
}

func GetDefaultConfig

func GetDefaultConfig() *DisablerConfig

Jump to

Keyboard shortcuts

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