Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { Function func(args string, message discordgo.Message, contextual bool, settings types.CommandSettings) (context bool, err error) Description string Settings types.CommandSettings Cooldown time.Duration // DEPRECATED }
Command represents a public, private or administrative command
type CommandManager ¶
type CommandManager struct { Config *types.Config Discord *discord.Session Storage storage.Storer Commands map[string]Command Contexts *cache.Cache Cooldowns map[string]time.Time Cache *cache.Cache }
CommandManager stores command state
func (*CommandManager) Init ¶
func (cm *CommandManager) Init( config *types.Config, discord *discord.Session, api storage.Storer, ) (err error)
Init creates a command manager for the app
func (*CommandManager) LoadCommands ¶
func (cm *CommandManager) LoadCommands()
LoadCommands is called on initialisation and is responsible for registering all commands and binding them to functions.
type CommandParametersRange ¶
CommandParametersRange represents minimum value and maximum value number of parameters for a command
type Hit ¶
type Hit struct { Index string `json:"index"` ID string `json:"id"` Score float64 `json:"score"` Locations struct { Description struct { Position []struct { Pos int `json:"pos"` Start int `json:"start"` End int `json:"end"` ArrayPositions interface{} `json:"array_positions"` } `json:"position"` } `json:"Description"` } `json:"locations"` Fragments struct { Description []string `json:"Description"` } `json:"fragments"` Sort []string `json:"sort"` }
type Results ¶
type Results struct { Status struct { Total int `json:"total"` Failed int `json:"failed"` Successful int `json:"successful"` } `json:"status"` Request struct { Query struct { Query string `json:"query"` } `json:"query"` Size int `json:"size"` From int `json:"from"` Highlight struct { Style interface{} `json:"style"` Fields interface{} `json:"fields"` } `json:"highlight"` Fields interface{} `json:"fields"` Facets interface{} `json:"facets"` Explain bool `json:"explain"` Sort []string `json:"sort"` IncludeLocations bool `json:"includeLocations"` SearchAfter interface{} `json:"search_after"` SearchBefore interface{} `json:"search_before"` } `json:"request"` Hits []Hit `json:"hits"` TotalHits int `json:"total_hits"` MaxScore float64 `json:"max_score"` Took int64 `json:"took"` Facets interface{} `json:"facets"` }
Click to show internal directories.
Click to hide internal directories.