command

package
v0.0.0-...-2498082 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommands

func GetCommands() map[string]internal.Command

func GetFooter

func GetFooter() *discordgo.MessageEmbedFooter

func GetResponse

func GetResponse(m *discordgo.MessageCreate, otherwise []string) string

func New

func New(name, usage, summary string, runner internal.Runner) internal.Command

func Register

func Register(c internal.Command, aliases ...string)

func RegisterDirects

func RegisterDirects(commands ...internal.Command)

func Run

func Run(command string, args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func RunDirect

func RunDirect(command string, args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func UnregisterDirects

func UnregisterDirects(commands ...internal.Command)

Types

type CommandImpl

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

func (*CommandImpl) Name

func (c *CommandImpl) Name() string

func (*CommandImpl) Run

func (c *CommandImpl) Run(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*CommandImpl) Summary

func (c *CommandImpl) Summary() string

func (*CommandImpl) Usage

func (c *CommandImpl) Usage() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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