pingmod

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: 10 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 PingMod.

func NewAquariumCommand

func NewAquariumCommand(m *PingMod) *meido.ModCommand

NewAquariumCommand returns a new aquarium command.

func NewFishCommand

func NewFishCommand(m *PingMod) *meido.ModCommand

NewFishCommand returns a new fish command.

func NewMonkeyCommand

func NewMonkeyCommand(m *PingMod) *meido.ModCommand

NewMonkeyCommand returns a new monkey command.

func NewPingCommand

func NewPingCommand(m *PingMod) *meido.ModCommand

NewPingCommand returns a new ping command.

Types

type PingMod

type PingMod struct {
	sync.Mutex

	Aquariums map[string]*aquarium
	// contains filtered or unexported fields
}

PingMod represents the ping mod

func (*PingMod) AllowDMs

func (m *PingMod) AllowDMs() bool

AllowDMs returns whether the mod allows DMs.

func (*PingMod) AllowedTypes

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

AllowedTypes returns the allowed MessageTypes.

func (*PingMod) Commands

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

Commands returns the mod commands.

func (*PingMod) Hook

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

Hook will hook the Mod into the Bot.

func (*PingMod) Load

func (m *PingMod) Load() error

Load loads the mod state from a file.

func (*PingMod) Name

func (m *PingMod) Name() string

Name returns the name of the mod.

func (*PingMod) Passives

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

Passives returns the mod passives.

func (*PingMod) RegisterCommand

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

RegisterCommand registers a ModCommand to the Mod

func (*PingMod) Save

func (m *PingMod) 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