Documentation ¶
Overview ¶
A package for command routing with discordgo
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandRegex = regexp.MustCompile(`(?m)("[^"]+"|[^\s"]+)`)
Functions ¶
Types ¶
type Handler ¶
type Handler interface { Handle(s *discordgo.Session, msg *discordgo.MessageCreate) //Returns a *commandmap.Map in use for this Handler GetCommandMap() *commandMap.Map }
type PremadeHandler ¶
type PremadeHandler struct { //states wether to use a regex match or a simple split Regex bool Prefix string // contains filtered or unexported fields }
this is the basic premade handler with support for one prefix u can change it up how u want because of the whole interfaces
func New ¶
func New(dg *discordgo.Session, cmds *commandMap.Map, Regex bool, prefix string) *PremadeHandler
initializes a basic pre made handler for you. noinspection ALL
func (*PremadeHandler) GetCommandMap ¶ added in v0.0.8
func (h *PremadeHandler) GetCommandMap() *commandMap.Map
Click to show internal directories.
Click to hide internal directories.