commands

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGuildNotFound = errors.New("guild not found")

ErrGuildNotFound is the error returned when a guild is not known about in a BotSession

View Source
var ErrUnknownRole = errors.New("unknown role")

Functions

func AdminCommandHandler

func AdminCommandHandler(deps adminDependencies, preCommand string) (*cmdhandler.CommandHandler, error)

AdminCommandHandler creates a new command handler for !admin commands

func AdminHandler

func AdminHandler(deps adminDependencies, versionStr string, opts Options) (*cmdhandler.CommandHandler, error)

AdminHandler creates a new command handler for !admin

func CommandHandler

func CommandHandler(deps dependencies, versionStr string, opts Options) (*cmdhandler.CommandHandler, error)

CommandHandler creates a new command handler for !list, !show, !signup, and !withdraw

func ConfigCommandHandler

func ConfigCommandHandler(deps configDependencies, versionStr, preCommand string) (*cmdhandler.CommandHandler, error)

ConfigCommandHandler creates a new command handler for !config-su commands

func ConfigDebugCommandHandler added in v0.18.0

func ConfigDebugCommandHandler(deps configDependencies, preCommand string) (*cmdhandler.CommandHandler, error)

ConfigDebugCommandHandler creates a new command handler for !config-su-debug commands

func ConfigDebugHandler added in v0.18.0

func ConfigDebugHandler(deps configDependencies) (*cmdhandler.CommandHandler, error)

func ConfigHandler

func ConfigHandler(deps configDependencies, versionStr string, opts Options) (*cmdhandler.CommandHandler, error)

ConfigHandler creates a new command handler for !config-su

func NewReactionHandler added in v0.23.0

func NewReactionHandler(deps reactionDependencies) reactions.Handler

Types

type Logger added in v0.26.0

type Logger = interface {
	Log(keyvals ...interface{}) error
	Message(string, ...interface{})
	Err(string, error, ...interface{})
	Printf(string, ...interface{})
}

type Options

type Options struct {
	CmdIndicator string
}

Options is the way to specify the command indicator string

Jump to

Keyboard shortcuts

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