spammodule

package
v0.0.0-...-025a0c4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 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 SpamModule

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

SpamModule detects banned emotes and deletes them

func New

func New() *SpamModule

New spam module

func (*SpamModule) AddPressure

func (w *SpamModule) AddPressure(info *bot.GuildInfo, m *discordgo.Message, track *userPressure, p float32, reason string) bool

AddPressure to a user and checks to see if it goes over the limit. Used to supplement spam module via filter module

func (*SpamModule) Commands

func (w *SpamModule) Commands() []bot.Command

Commands in the module

func (*SpamModule) Description

func (w *SpamModule) Description(info *bot.GuildInfo) string

Description of the module

func (*SpamModule) DisableLockdown

func (w *SpamModule) DisableLockdown(info *bot.GuildInfo)

DisableLockdown disables the guild lockdown, if there is one

func (*SpamModule) Name

func (w *SpamModule) Name() string

Name of the module

func (*SpamModule) OnCommand

func (w *SpamModule) OnCommand(info *bot.GuildInfo, m *discordgo.Message) bool

OnCommand discord hook

func (*SpamModule) OnGuildMemberAdd

func (w *SpamModule) OnGuildMemberAdd(info *bot.GuildInfo, m *discordgo.Member, t time.Time)

OnGuildMemberAdd discord hook

func (*SpamModule) OnGuildMemberRemove

func (w *SpamModule) OnGuildMemberRemove(info *bot.GuildInfo, m *discordgo.Member, t time.Time)

OnGuildMemberRemove discord hook

func (*SpamModule) OnGuildMemberUpdate

func (w *SpamModule) OnGuildMemberUpdate(info *bot.GuildInfo, m *discordgo.Member, t time.Time)

OnGuildMemberUpdate discord hook

func (*SpamModule) OnMessageCreate

func (w *SpamModule) OnMessageCreate(info *bot.GuildInfo, m *discordgo.Message)

OnMessageCreate discord hook

func (*SpamModule) OnTick

func (w *SpamModule) OnTick(info *bot.GuildInfo, t time.Time)

OnTick discord hook

func (*SpamModule) TrackUser

func (w *SpamModule) TrackUser(author bot.DiscordUser, timestamp time.Time) *userPressure

TrackUser gets or creates the user tracking object for a given author

Jump to

Keyboard shortcuts

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