Documentation ¶
Overview ¶
Package cmdtable implements tools to look up chat commands in a table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandContext ¶
type CommandContext[Executor any] struct { Command commands.Command ArgValidator *regexp.Regexp Executor Executor Tag string // TODO: should probably be in ipc.Command }
A CommandContext holds information on a command.
type Inserter ¶
type Inserter[E any] struct { // contains filtered or unexported fields }
An Inserter is used to insert multiple commands into the table in a single transaction.
func (*Inserter[E]) Insert ¶
func (i *Inserter[E]) Insert(cmd []byte, cc *CommandContext[E])
type Table ¶
type Table[Executor any] struct { // contains filtered or unexported fields }
func (*Table[E]) Command ¶
func (tab *Table[E]) Command(cc *CommandContext[E])
func (*Table[E]) Commands ¶
func (tab *Table[E]) Commands(ccs []*CommandContext[E])
func (*Table[E]) Dynamic ¶
Dynamic replaces the current dynamically loaded commands in the table.
Click to show internal directories.
Click to hide internal directories.