moderationmod

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string) meido.Mod

func NewBanCommand

func NewBanCommand(m *ModerationMod) *meido.ModCommand

func NewCheckFilterPassive

func NewCheckFilterPassive(m *ModerationMod) *meido.ModPassive

func NewClearAllWarnsCommand

func NewClearAllWarnsCommand(m *ModerationMod) *meido.ModCommand

func NewClearFilterCommand

func NewClearFilterCommand(m *ModerationMod) *meido.ModCommand

func NewClearWarnCommand

func NewClearWarnCommand(m *ModerationMod) *meido.ModCommand

func NewFilterWordCommand

func NewFilterWordCommand(m *ModerationMod) *meido.ModCommand

func NewFilterWordListCommand

func NewFilterWordListCommand(m *ModerationMod) *meido.ModCommand

func NewHackbanCommand

func NewHackbanCommand(m *ModerationMod) *meido.ModCommand

func NewKickCommand

func NewKickCommand(m *ModerationMod) *meido.ModCommand

func NewLockdownChannelCommand

func NewLockdownChannelCommand(m *ModerationMod) *meido.ModCommand

func NewModerationSettingsCommand

func NewModerationSettingsCommand(m *ModerationMod) *meido.ModCommand

func NewUnbanCommand

func NewUnbanCommand(m *ModerationMod) *meido.ModCommand

func NewUnlockChannelCommand

func NewUnlockChannelCommand(m *ModerationMod) *meido.ModCommand

func NewWarnCommand

func NewWarnCommand(m *ModerationMod) *meido.ModCommand

func NewWarnCountCommand

func NewWarnCountCommand(m *ModerationMod) *meido.ModCommand

func NewWarnLogCommand

func NewWarnLogCommand(m *ModerationMod) *meido.ModCommand

Types

type DiscordGuild

type DiscordGuild struct {
	UID      int    `db:"uid"`
	GuildID  string `db:"guild_id"`
	UseWarns bool   `db:"use_warns"`
	MaxWarns int    `db:"max_warns"`

	// described in days, 0 means infinite duration
	WarnDuration int `db:"warn_duration"`
}

type FilterEntry

type FilterEntry struct {
	UID     int    `db:"uid"`
	GuildID string `db:"guild_id"`
	Phrase  string `db:"phrase"`
}

type ModerationMod

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

func (*ModerationMod) AllowDMs

func (m *ModerationMod) AllowDMs() bool

func (*ModerationMod) AllowedTypes

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

func (*ModerationMod) Commands

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

func (*ModerationMod) Hook

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

func (*ModerationMod) Load

func (m *ModerationMod) Load() error

func (*ModerationMod) Name

func (m *ModerationMod) Name() string

func (*ModerationMod) Passives

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

func (*ModerationMod) RegisterCommand

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

func (*ModerationMod) Save

func (m *ModerationMod) Save() error

type WarnEntry

type WarnEntry struct {
	UID         int        `db:"uid"`
	GuildID     string     `db:"guild_id"`
	UserID      string     `db:"user_id"`
	Reason      string     `db:"reason"`
	GivenByID   string     `db:"given_by_id"`
	GivenAt     time.Time  `db:"given_at"`
	IsValid     bool       `db:"is_valid"`
	ClearedByID *string    `db:"cleared_by_id"`
	ClearedAt   *time.Time `db:"cleared_at"`
}

Jump to

Keyboard shortcuts

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