app

package
v0.0.0-...-bf34452 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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