commands

package
v0.0.0-...-984de81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Fields          []string
	Content         string
	IsDirected      bool
	IsPrivate       bool
	HasPrefix       bool
	HasMention      bool
	HasMentionFirst bool
}

Context holds a bit of extra data rather than current string implementation. As we move on for more generic command parsing for Iris, it should take input from users as a Context rather than single string parsing. By using this we only have to process some of the info once.

type HandlerFunc

type HandlerFunc func(s *discordgo.Session, m *discordgo.Message, ctx *Context)

type Route

type Route struct {
	Pattern     string
	Description string
	Help        string
	Runner      HandlerFunc
}

Route holds information about a specific message route handler. This will be responsible to routing input user message to specific commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL