commandGroup

package
Version: v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdGroup

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

func New

func New(name string) *CmdGroup

func (*CmdGroup) AddCommand

func (c *CmdGroup) AddCommand(name string, cmd command.Command)

func (*CmdGroup) CanExecute

func (c *CmdGroup) CanExecute(cmd string) bool

func (*CmdGroup) Execute

func (c *CmdGroup) Execute(cmd string, ctx ctx.Ctx, session *discordgo.Session) error

func (*CmdGroup) GetCommand

func (c *CmdGroup) GetCommand(cmd string) command.Command

func (*CmdGroup) GetCommands

func (c *CmdGroup) GetCommands() map[string]command.Command

func (*CmdGroup) GetName

func (c *CmdGroup) GetName() string

type Group

type Group interface {
	GetName() string
	AddCommand(name string, cmd command.Command)
	GetCommand(cmd string) command.Command
	GetCommands() map[string]command.Command
	CanExecute(cmd string) bool
	Execute(cmd string, ctx ctx.Ctx, session *discordgo.Session) error
}

* Group a command group used for implementing things like !moderation ban @player

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL