commands

package
v0.0.0-...-0b0b1ae Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command func(ctx *gocord.Context)

TODO add custom context that inherits gocord.Context?

type CommandHandler

type CommandHandler struct {
	Prefix   string
	Commands []CommandRoute
}

func New

func New(opts Options) *CommandHandler

func (*CommandHandler) Handle

func (c *CommandHandler) Handle(ctx *gocord.Context)

func (*CommandHandler) On

func (c *CommandHandler) On(command string, handler Command) *CommandRoute

type CommandRoute

type CommandRoute struct {
	Name    string
	Aliases []string
	Handler Command
}

type Options

type Options struct {
	Prefix string
}

Jump to

Keyboard shortcuts

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