antispam

package
v0.0.0-...-ae6a1b9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MAX_CACHE_DURATION = 600
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AntiSpam

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

func NewAntiSpam

func NewAntiSpam(maxInterval int, maxDuplicatesInterval int,
	exemptRoles []string, ignoredUsers []string, ignoredChannels []string) AntiSpam

func (*AntiSpam) AddProtectionConfig

func (antiSpam *AntiSpam) AddProtectionConfig(config ProtectionConfig)

func (*AntiSpam) OnMessage

func (antiSpam *AntiSpam) OnMessage(message *discordgo.Message)

func (*AntiSpam) Start

func (antiSpam *AntiSpam) Start()

func (*AntiSpam) Stop

func (antiSpam *AntiSpam) Stop()

type ProtectionConfig

type ProtectionConfig struct {
	Threshold     int
	MaxDuplicates int
	Callback      func(string, string, []*discordgo.Message)
}

Jump to

Keyboard shortcuts

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