command

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commanders = CommandersChain{}

Functions

This section is empty.

Types

type Commander

type Commander interface {
	Keyword() string
	Run(event interface{}, arg string) (MsgType, string)
	Example() string
	Hidden() bool
}

type CommandersChain

type CommandersChain struct {
	RegisteredCommanders []Commander
}

CommandersChain defines a Commander array.

func (*CommandersChain) GetHelpMessage

func (c *CommandersChain) GetHelpMessage() string

func (*CommandersChain) Register

func (c *CommandersChain) Register(cmd Commander)

type DefaultCommander added in v1.5.0

type DefaultCommander struct {
}

func (*DefaultCommander) Example added in v1.5.0

func (d *DefaultCommander) Example() string

func (*DefaultCommander) Hidden added in v1.5.0

func (d *DefaultCommander) Hidden() bool

func (*DefaultCommander) Keyword added in v1.5.0

func (d *DefaultCommander) Keyword() string

func (*DefaultCommander) Run added in v1.5.0

func (d *DefaultCommander) Run(event interface{}, arg string) (MsgType, string)

type MsgType added in v1.5.0

type MsgType int32
const (
	TypeImage MsgType = iota
	TypeText  MsgType = iota
	TypeNil   MsgType = iota
)

Jump to

Keyboard shortcuts

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