Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
func (*Bot) AddAdminCommand ¶
func (*Bot) IsAdmin ¶
func (b *Bot) IsAdmin(ctx *CommandContext) bool
type Command ¶
type Command func(ctx *CommandContext, args []string)
type CommandContext ¶
type CommandContext struct {
Session *discordgo.Session
Message *discordgo.MessageCreate
Bot *Bot
// contains filtered or unexported fields
}
func (*CommandContext) IsAdmin ¶
func (ctx *CommandContext) IsAdmin() bool
func (*CommandContext) LookupUser ¶
func (ctx *CommandContext) LookupUser(user string) (string, error)
func (*CommandContext) SendResponse ¶
func (ctx *CommandContext) SendResponse(message string)
type CommandSet ¶
type CommandSet struct {
// contains filtered or unexported fields
}
func NewCommandSet ¶
func NewCommandSet() *CommandSet
func (*CommandSet) AddCommand ¶
func (c *CommandSet) AddCommand(name string, help string, run Command, needsAdmin bool)
func (*CommandSet) Exec ¶
func (c *CommandSet) Exec(ctx *CommandContext, args []string)
func (*CommandSet) Help ¶
func (c *CommandSet) Help(ctx *CommandContext)
func (*CommandSet) HelpMsg ¶
func (c *CommandSet) HelpMsg(isAdmin bool) string
Click to show internal directories.
Click to hide internal directories.