command

package
v0.0.0-...-48fb8fa Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, c Command)

Register to subscribe to the bot

Types

type Command

type Command interface {
	Handle(message *discordgo.MessageCreate, cmd string, args ...string) error
}

Command interface

func HandlerFor

func HandlerFor(name string) (Command, error)

HandlerFor tp double check

type CommandFunc

type CommandFunc func(message *discordgo.MessageCreate, cmd string, args ...string) error

func (CommandFunc) Handle

func (f CommandFunc) Handle(message *discordgo.MessageCreate, cmd string, args ...string) error

Handle to attach

Jump to

Keyboard shortcuts

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