Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicHandler ¶
type BasicHandler struct { // Regex is true if the bot should check for the arguments using regex or the strings package. Regex bool // Prefix is the bot prefix. Prefix string // contains filtered or unexported fields }
BasicHandler is a basic handler with support for one prefix. You can change it up how you want because of the Handler interface.
func NewBasicHandler ¶
func NewBasicHandler(session *discordgo.Session, regex bool, prefix string, commands *command.Map) *BasicHandler
NewBasicHandler initializes a new basic handler and returns it.
func (*BasicHandler) Commands ¶
func (h *BasicHandler) Commands() *command.Map
Commands returns the command map.
func (*BasicHandler) Handle ¶
func (h *BasicHandler) Handle(s *discordgo.Session, msg *discordgo.MessageCreate)
Handle handles a message. It is given the session and message creation information.
type Handler ¶
type Handler interface { // Handle handles a message. It is given the session and message creation information. Handle(session *discordgo.Session, message *discordgo.MessageCreate) // Commands returns the command map. Commands() *command.Map }
Handler is an abstract version of a handler.
Click to show internal directories.
Click to hide internal directories.