antiraidmod

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(n string) meido.Mod

New returns a new AntiRaidMod.

Types

type AntiRaidMod

type AntiRaidMod struct {
	sync.Mutex
	// contains filtered or unexported fields
}

AntiRaidMod represents the antiraid mod

func (*AntiRaidMod) AllowDMs

func (m *AntiRaidMod) AllowDMs() bool

AllowDMs returns whether the mod allows DMs.

func (*AntiRaidMod) AllowedTypes

func (m *AntiRaidMod) AllowedTypes() meido.MessageType

AllowedTypes returns the allowed MessageTypes.

func (*AntiRaidMod) AutoDetectHandler

func (m *AntiRaidMod) AutoDetectHandler(s *discordgo.Session, mem *discordgo.GuildMemberAdd)

func (*AntiRaidMod) Commands

func (m *AntiRaidMod) Commands() map[string]*meido.ModCommand

Commands returns the mod commands.

func (*AntiRaidMod) GuildMemberAddHandler

func (m *AntiRaidMod) GuildMemberAddHandler(s *discordgo.Session, mem *discordgo.GuildMemberAdd)

func (*AntiRaidMod) Hook

func (m *AntiRaidMod) Hook(b *meido.Bot) error

Hook will hook the Mod into the Bot.

func (*AntiRaidMod) Load

func (m *AntiRaidMod) Load() error

Load loads the mod state from a file.

func (*AntiRaidMod) MessageCreateHandler

func (m *AntiRaidMod) MessageCreateHandler(s *discordgo.Session, msg *discordgo.MessageCreate)

func (*AntiRaidMod) Name

func (m *AntiRaidMod) Name() string

Name returns the name of the mod.

func (*AntiRaidMod) Passives

func (m *AntiRaidMod) Passives() []*meido.ModPassive

Passives returns the mod passives.

func (*AntiRaidMod) RaidToggleHandler

func (m *AntiRaidMod) RaidToggleHandler(s *discordgo.Session, msg *discordgo.MessageCreate)

func (*AntiRaidMod) RegisterCommand

func (m *AntiRaidMod) RegisterCommand(cmd *meido.ModCommand)

RegisterCommand registers a ModCommand to the Mod

func (*AntiRaidMod) Save

func (m *AntiRaidMod) Save() error

Save saves the mod state to a file.

Jump to

Keyboard shortcuts

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