commands

package
v0.0.0-...-e3af7b5 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandsModule

type CommandsModule struct {
	Server   *server.Server
	Regex    *regexp.Regexp
	Commands []ICommand
}

func (CommandsModule) GetName

func (module CommandsModule) GetName() string

func (*CommandsModule) Init

func (module *CommandsModule) Init(s *server.Server) error

func (*CommandsModule) RegisterCommand

func (module *CommandsModule) RegisterCommand(command ICommand) error

type HelpPageEntry

type HelpPageEntry struct {
	Description string
	Usage       string
	Command     string
	IsHidden    bool
}

type ICommand

type ICommand interface {
	Check(cmd string) bool
	Action(m *discordgo.MessageCreate, args []string, creator *messages.MessageCreator) error
	ShouldRemoveOriginal() bool
	GetHelpPageEntry() HelpPageEntry
}

Jump to

Keyboard shortcuts

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