Documentation ¶
Index ¶
- Constants
- func GetHandleMessage(commandMap stringmap.StringMap, featureRegistry *feature.Registry, ...) func(api.DiscordSession, *discordgo.MessageCreate)
- func HandleCommands(featureRegistry *feature.Registry, s api.DiscordSession, ...)
- func InitializeRegistry(commandMap stringmap.StringMap, karmaMap stringmap.StringMap, ...) *feature.Registry
Constants ¶
View Source
const (
// MsgPublicOnly is a user-visible string for commands that cannot be executed in a private channels.
MsgPublicOnly = "Cannot execute `%s` in a private channel"
)
Variables ¶
This section is empty.
Functions ¶
func GetHandleMessage ¶
func GetHandleMessage(commandMap stringmap.StringMap, featureRegistry *feature.Registry, commandChannel chan<- *model.Command) func(api.DiscordSession, *discordgo.MessageCreate)
GetHandleMessage returns the main handler for incoming messages.
func HandleCommands ¶
func HandleCommands(featureRegistry *feature.Registry, s api.DiscordSession, commandChannel <-chan *model.Command)
HandleCommands pops commands off the command channel and attempts to dispatch them to a command executor.
func InitializeRegistry ¶
func InitializeRegistry( commandMap stringmap.StringMap, karmaMap stringmap.StringMap, voteMap stringmap.StringMap, gist api.Gist, config *config.Config, clock model.UTCClock, timer model.UTCTimer, commandChannel chan<- *model.Command) *feature.Registry
InitializeRegistry registers all of the features of the chatbot with the registry and returns the initialized registry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.