Documentation
¶
Index ¶
- Variables
- type Handler
- type Helper
- func (h *Helper) AddHandler(command string, handler *Handler) func()
- func (h *Helper) AddHandlerMultipleCommands(commands []string, handler *Handler) map[string]func()
- func (h *Helper) AddHandlers(handlers map[string]*Handler) map[string]func()
- func (h *Helper) AddHandlersMultipleCommands(commands []struct{ ... }) map[string]func()
- func (h *Helper) CmdArgs(m *discordgo.MessageCreate) (cmd string, argc int, argv []string)
- func (h *Helper) Open() error
- func (h *Helper) SetPrefix(prefix string)
- type MessageHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCommandEmpty = errors.New("command is empty")
)
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Handler MessageHandler Usage string Description string }
type Helper ¶
type Helper struct { Session *discordgo.Session DefaultHandler MessageHandler // contains filtered or unexported fields }
func NewHelperFromSession ¶
func (*Helper) AddHandler ¶
func (*Helper) AddHandlerMultipleCommands ¶
func (*Helper) AddHandlers ¶
func (*Helper) AddHandlersMultipleCommands ¶
type MessageHandler ¶
type MessageHandler func(*discordgo.Session, *discordgo.MessageCreate)
Click to show internal directories.
Click to hide internal directories.