cmds

package
v0.0.0-...-d01fd15 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddWordToBookCommand

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

AddWordToBookCommand is a command to add a word to a book.

func (*AddWordToBookCommand) Execute

func (*AddWordToBookCommand) Help

type CreateBookCommand

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

CreateBookCommand is the command for create book.

func (*CreateBookCommand) Execute

func (cmd *CreateBookCommand) Execute(
	ctx contextx.Contextx,
	who *agg.Member,
	text string,
) ([]messaging_api.MessageInterface, error)

func (*CreateBookCommand) Help

func (cmd *CreateBookCommand) Help(ctx contextx.Contextx) string

type ExplainCommand

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

ExplainCommand is the command for explain.

func (*ExplainCommand) Execute

func (cmd *ExplainCommand) Execute(
	ctx contextx.Contextx,
	who *agg.Member,
	text string,
) ([]messaging_api.MessageInterface, error)

func (*ExplainCommand) Help

func (cmd *ExplainCommand) Help(ctx contextx.Contextx) string

type GetBookByNameCommand

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

GetBookByNameCommand is a command to get book by name.

func (*GetBookByNameCommand) Execute

func (*GetBookByNameCommand) Help

type HelpCommand

type HelpCommand struct {
}

func (*HelpCommand) Execute

func (cmd *HelpCommand) Execute(
	ctx contextx.Contextx,
	who *agg.Member,
	text string,
) ([]messaging_api.MessageInterface, error)

func (*HelpCommand) Help

func (cmd *HelpCommand) Help(ctx contextx.Contextx) string

type PingCommand

type PingCommand struct {
}

PingCommand is the command for ping.

func (*PingCommand) Execute

func (cmd *PingCommand) Execute(
	ctx contextx.Contextx,
	who *agg.Member,
	text string,
) ([]messaging_api.MessageInterface, error)

func (*PingCommand) Help

func (cmd *PingCommand) Help(ctx contextx.Contextx) string

type TextCommander

type TextCommander interface {
	// Execute is the function to execute the command.
	Execute(ctx contextx.Contextx, who *agg.Member, text string) ([]messaging_api.MessageInterface, error)

	// Help is the function to get the help message.
	Help(ctx contextx.Contextx) string
}

TextCommander is the interface for text command.

func NewCommands

func NewCommands(client *openaix.Client, mgmt biz.IManagementBiz) []TextCommander

NewCommands is the function to create the text commands.

type WhoAmICommand

type WhoAmICommand struct {
}

WhoAmICommand is the command for whoami.

func (*WhoAmICommand) Execute

func (cmd *WhoAmICommand) Execute(
	ctx contextx.Contextx,
	who *agg.Member,
	text string,
) ([]messaging_api.MessageInterface, error)

func (*WhoAmICommand) Help

func (cmd *WhoAmICommand) Help(ctx contextx.Contextx) string

Jump to

Keyboard shortcuts

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