commandHandlers

package
v0.0.0-...-3ba6e34 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Router = RouterStruct{
	// contains filtered or unexported fields
}

Router explicitly maps input chat command to a handler

Functions

func Alias

func Alias(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

Alias creates alias of existing command by copying its content and setting that it is alias to a parent command

func Custom

func Custom(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

Custom handler checks if input command has template and then fills it in with mustache templating and sends to a specified/user

func New

func New(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

New creates or modifies mustache templates for channel

func Nothing

func Nothing(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

Nothing does nothing, it is stub

func Short

func Short(s string, i int) string

func SongRequestAdd

func SongRequestAdd(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

func SubdayEnd

func SubdayEnd(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

func SubdayNew

func SubdayNew(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

func Vote

func Vote(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

Types

type CommandHandler

type CommandHandler func(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)

CommandHandler is interface for functions that will handle stuff

type RouterStruct

type RouterStruct struct {
	// contains filtered or unexported fields
}

RouterStruct is struct for handling command to handler

func (RouterStruct) Go

func (router RouterStruct) Go(command string) CommandHandler

Go returns from router to work with

Jump to

Keyboard shortcuts

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