Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HelpProvider ¶
type HelpProvider interface {
Help(ctx ken.SubCommandContext) (emb *discordgo.MessageEmbed, err error)
}
HelpProvider defines a command which provides help content.
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware implements ken.MiddlewareBefore. It checks if a command implements HelpProvider on execution and attaches a help sub command handler. When the help sub command was called, a message is responded containing the embed returned by the Help implementation.
func New ¶
func New(subCommandName ...string) *Middleware
New returns a new instance of Middleware.
You can also pass a custom name for the help sub command. This defaults to "help" otherwise.
Click to show internal directories.
Click to hide internal directories.