Versions in this module Expand all Collapse all v0 v0.6.2 Dec 2, 2018 v0.6.1 Dec 1, 2018 Changes in this version + const ColorDanger + const ColorDefault + const ColorInfo + const ColorPrimary + const ColorSuccess + const ColorWarning + const ReactionOk + const ResponseDanger + const ResponseDefault + const ResponseInfo + const ResponsePlainText + const ResponseSuccess + const ResponseWarning + const VERSION + type Command struct + Description string + Execute func(req *Request) (*Response, error) + HasParams bool + PermissionsRequired int + RequireGuild bool + SubCommands []*Command + Trigger string + func (c *Command) GetPath() (value string) + func (c *Command) GetSubcommandsTriggers(sg *Instance, req *Request) []string + type Instance struct + DefaultTrigger string + ErrorHandler func(req *Request, err error) + HelpTrigger string + IsTriggered func(req *Request) (triggered bool) + RootCommand *Command + Self *discordgo.User + Session *discordgo.Session + func New() *Instance + func (sg *Instance) AddCommand(c *Command) + func (sg *Instance) AddRequestMiddleware(m RequestMiddleware) + func (sg *Instance) AddResponseMiddleware(m ResponseMiddleware) + func (sg *Instance) AddShutdownHandler(handler shutdownHandler) + func (sg *Instance) AddStartupHandler(handler startupHandler) + func (sg *Instance) FindCommand(req *Request, q string) (*Command, error) + func (sg *Instance) HandleError(req *Request, err error) + func (sg *Instance) Shutdown() + func (sg *Instance) Startup(token string) (err error) + type Request struct + Channel *discordgo.Channel + Command *Command + Ctx context.Context + Message *discordgo.Message + Query string + Sugo *Instance + func (req *Request) AddReaction(reaction emoji) (err error) + func (req *Request) GetGuild() (*discordgo.Guild, error) + func (req *Request) IsChannelDM() bool + func (req *Request) IsChannelDefault() bool + func (req *Request) NewResponse(respType responseType, title string, text string) (resp *Response) + func (req *Request) PlainTextResponse(text string) (resp *Response) + func (req *Request) SimpleResponse(text string) (resp *Response) + type RequestMiddleware func(*Request) error + type Response struct + Embed *discordgo.MessageEmbed + Emoji discordgo.Emoji + Request *Request + Text string + Type responseType + func (resp *Response) Send() (m *discordgo.Message, err error) + func (resp *Response) SendDM() (m *discordgo.Message, err error) + type ResponseMiddleware func(*Response) error