Versions in this module Expand all Collapse all v0 v0.1.0 Aug 26, 2021 Changes in this version + var RegexArguments = regexp.MustCompile("(\"[^\"]+\"|[^\\s]+)") + var RegexChannelMention = regexp.MustCompile("<#(\\d+)>") + var RegexRoleMention = regexp.MustCompile("<@&(\\d+)>") + var RegexSnowflakeID = regexp.MustCompile("[\\d]{18}") + var RegexUserMention = regexp.MustCompile("<@!?(\\d+)>") + type ApplicationCommandOption struct + Choices []*discordgo.ApplicationCommandOptionChoice + Description string + Handler func(*Ctx) + Name string + Options []*ApplicationCommandOption + Required bool + Type discordgo.ApplicationCommandOptionType + type Category struct + Commands []*Command + Description string + HelpEmoji string + ID string + Name string + RegisterCmds func(c *Category) + func (c *Category) AddCommand(cmd *Command) + func (c *Category) GetCommand(name string) *Command + type Command struct + ApplicationID string + Description string + Handler func(*Ctx) + ID string + Name string + Options []*ApplicationCommandOption + Type discordgo.ApplicationCommandType + Version string + func (c *Command) ToApplicationCommand() *discordgo.ApplicationCommand + type Ctx struct + Channel *discordgo.Channel + Guild *discordgo.Guild + Interaction *discordgo.InteractionCreate + Options []*discordgo.ApplicationCommandInteractionDataOption + Router *Router + Session *discordgo.Session + User *discordgo.User + func (ctx *Ctx) EditResponse(newrsp *discordgo.WebhookEdit) + func (ctx *Ctx) Respond(itype discordgo.InteractionResponseType, ...) + func (ctx *Ctx) StrToID(str string, itype IDType) string + func (ctx *Ctx) WaitForResponse() *discordgo.MessageCreate + type IDType int + const ChannelMentionID + const RoleMentionID + const UserMentionID + type Router struct + AllCommands []*Command + Cateories []*Category + Session *discordgo.Session + Uncategorized []*Command + func Create(s *discordgo.Session) *Router + func (r *Router) AddCategory(c *Category) + func (r *Router) AddCommand(c *Command) + func (r *Router) GetCategory(name string) *Category + func (r *Router) GetCommand(name string) *Command + func (r *Router) RegisterAllCommands(guildID string)