Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
Commands []*Command
Handle string
AppContext map[string]interface{}
// contains filtered or unexported fields
}
Bot for handling discord messages
type Command ¶
type Command struct {
// Name of the command
Name string
// Description of the command shown in help output
Description string
// Channel that this command is bound to
// if no channel is specified, this command can be called
// from any channel
Channel string
// Action of the command
Action func(*Context) error
// Subcommands
Subcommands []*Command
}
Command for a message
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context of a message
func (*Context) Attachment ¶
func (c *Context) Attachment(i int) (io.ReadCloser, error)
Attachment reader of the message
Click to show internal directories.
Click to hide internal directories.