commands

package
v0.0.0-...-93f332f Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Err   int = -1
	Say       = 0
	Emote     = 1
	Reply     = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BotCommand

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

func (BotCommand) Apb

func (bc BotCommand) Apb(event BotCommand) (response Response, err error)

func (BotCommand) Caffeine

func (c BotCommand) Caffeine(event BotCommand) (response Response, err error)

func (BotCommand) Emote

func (bc BotCommand) Emote(event BotCommand) (response Response, err error)

func (BotCommand) Help

func (bc BotCommand) Help(event BotCommand) (response Response, err error)

func (BotCommand) Insult

func (bc BotCommand) Insult(event BotCommand) (response Response, err error)

func (BotCommand) Message

func (bc BotCommand) Message(event BotCommand) (response Response, err error)

func (BotCommand) Praise

func (bc BotCommand) Praise(event BotCommand) (response Response, err error)

func (BotCommand) Quote

func (bc BotCommand) Quote(event BotCommand) (response Response, err error)

func (BotCommand) React

func (bc BotCommand) React(event BotCommand) (response Response, err error)

func (BotCommand) Roll

func (bc BotCommand) Roll(event BotCommand) (response Response, err error)

func (BotCommand) Say

func (bc BotCommand) Say(event BotCommand) (response Response, err error)

type BotCommandHelp

type BotCommandHelp struct{}

func (BotCommandHelp) Praise

func (h BotCommandHelp) Praise(request BotCommand) (response HelpResponse)

func (BotCommandHelp) React

func (h BotCommandHelp) React(request BotCommand) (response HelpResponse)

func (BotCommandHelp) Roll

func (h BotCommandHelp) Roll(request BotCommand) (response HelpResponse)

type Commands

type Commands struct {
	Mm       *mmclient.MMClient
	Settings *settings.Settings
	// contains filtered or unexported fields
}

func NewCommands

func NewCommands(settings *settings.Settings, mm *mmclient.MMClient) *Commands

func (*Commands) HandleCommandMsgFromWebSocket

func (c *Commands) HandleCommandMsgFromWebSocket(event *model.WebSocketEvent) (Response, error)

func (*Commands) NewBotCommandFromPost

func (c *Commands) NewBotCommandFromPost(post string, sender string) (BotCommand, error)

func (*Commands) SendErrorResponse

func (c *Commands) SendErrorResponse(target string, message string) (Response, error)

type HelpResponse

type HelpResponse struct {
	Description string
	Help        string
}

type Method

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

type Response

type Response struct {
	Message string
	Type    string
	Channel string
}

Jump to

Keyboard shortcuts

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