commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCommand

type BaseCommand struct {
	// Permissions
	ChannelRestriction acl.ChannelRestriction
	RoleRestriction    acl.RoleRestriction

	// Command calls
	Long    string
	Aliases []string

	Options Options

	// Internal fields
	SubCommands []SubCommand
	Help        Help
	Players     *player.Players
	// contains filtered or unexported fields
}

func (BaseCommand) ACL

func (BaseCommand) Calls

func (c BaseCommand) Calls() (string, []string)

func (BaseCommand) DisplayHelp

func (c BaseCommand) DisplayHelp(s *discordgo.Session, m *discordgo.Message, prefix string)

func (BaseCommand) GetHelp

func (c BaseCommand) GetHelp() Help

func (BaseCommand) Opts

func (c BaseCommand) Opts() Options

type Command

type Command interface {
	Handler(s *discordgo.Session, m *discordgo.Message, args []string)
	DisplayHelp(s *discordgo.Session, m *discordgo.Message, prefix string)
	GetHelp() Help
	ACL() (acl.ChannelRestriction, acl.RoleRestriction)
	Calls() (string, []string)
	Opts() Options
}

func NewFavCommand

func NewFavCommand(p *player.Players, log zerolog.Logger, storage *storage.StormDB) Command

func NewJamCommand

func NewJamCommand(p *player.Players, log zerolog.Logger) Command

func NewNowPlayingCommand

func NewNowPlayingCommand(p *player.Players, log zerolog.Logger) Command

func NewPauseCommand

func NewPauseCommand(p *player.Players, log zerolog.Logger) Command

func NewPlayCommand

func NewPlayCommand(p *player.Players, log zerolog.Logger) Command

func NewQueueCommand

func NewQueueCommand(p *player.Players, log zerolog.Logger) Command

func NewRemoveCommand

func NewRemoveCommand(p *player.Players, log zerolog.Logger) Command

func NewSetupCommand

func NewSetupCommand(p *player.Players, log zerolog.Logger, storage *storage.StormDB) Command

func NewSkipCommand

func NewSkipCommand(p *player.Players, log zerolog.Logger) Command

func NewStatsCommand

func NewStatsCommand(p *player.Players, log zerolog.Logger) Command

func NewStopCommand

func NewStopCommand(p *player.Players, log zerolog.Logger) Command

func NewVolumeCommand

func NewVolumeCommand(p *player.Players, log zerolog.Logger) Command

type Example

type Example struct {
	Command     string
	Explanation string
}

type Help

type Help struct {
	Examples    []Example
	Usage       string
	Title       string
	ShortDesc   string
	Description string
}

type Options

type Options struct {
	ArgsRequired      bool
	DeleteUserMessage bool
	DMCapability      bool
}

type SubCommand

type SubCommand struct {
	Long        string
	Aliases     []string
	Arg         string
	Description string
}

Jump to

Keyboard shortcuts

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