Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooManyCalls = errors.New("Too many calls to this function")
View Source
var ( StandardFuncMap = map[string]interface{}{ "dict": Dictionary, "json": tmplJson, "in": in, "title": strings.Title, "add": add, "roleAbove": roleIsAbove, "adjective": common.RandomAdjective, "randInt": randInt, "shuffle": shuffle, "seq": sequence, "joinStr": joinStrings, "str": str, "lower": strings.ToLower, "toString": ToString, "toInt": tmplToInt, "toInt64": ToInt64, "formatTime": tmplFormatTime, "slice": slice, } )
Functions ¶
func Dictionary ¶
dictionary creates a map[string]interface{} from the given parameters by walking the parameters and treating them as key-value pairs. The number of parameters must be even.
func RegisterSetupFunc ¶
func RegisterSetupFunc(f ContextSetupFunc)
Types ¶
type Context ¶
type Context struct { GS *dstate.GuildState CS *dstate.ChannelState Member *discordgo.Member Msg *discordgo.Message BotUser *discordgo.User ContextFuncs map[string]interface{} Data map[string]interface{} Redis *redis.Client MentionEveryone bool MentionHere bool MentionRoles []int64 MentionRoleNames []string DelResponse bool DelTrigger bool DelTriggerDelay int DelResponseDelay int Counters map[string]int }
func NewContext ¶
func NewContext(botUser *discordgo.User, gs *dstate.GuildState, cs *dstate.ChannelState, member *discordgo.Member) *Context
type ContextSetupFunc ¶
type ContextSetupFunc func(ctx *Context)
Click to show internal directories.
Click to hide internal directories.