commands

package
v0.0.0-...-553c796 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands []interfaces.Command

Commands is a slice of all enabled commands.

DJ is an injected MumbleDJ struct.

Functions

This section is empty.

Types

type AddCommand

type AddCommand struct{}

AddCommand is a command that adds an audio track associated with a supported URL to the queue.

func (*AddCommand) Aliases

func (c *AddCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*AddCommand) Description

func (c *AddCommand) Description() string

Description returns the description for the command.

func (*AddCommand) Execute

func (c *AddCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*AddCommand) IsAdminCommand

func (c *AddCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type AddLocalStorage

type AddLocalStorage struct{}

AddLocalStorage is a command that adds an audio track to a local storage.

func (*AddLocalStorage) Aliases

func (c *AddLocalStorage) Aliases() []string

Aliases returns the current aliases for the command.

func (*AddLocalStorage) Description

func (c *AddLocalStorage) Description() string

Description returns the description for the command.

func (*AddLocalStorage) Execute

func (c *AddLocalStorage) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*AddLocalStorage) IsAdminCommand

func (c *AddLocalStorage) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type AddNextCommand

type AddNextCommand struct{}

AddNextCommand is a command that adds an audio track associated with a supported URL to the queue as the next item.

func (*AddNextCommand) Aliases

func (c *AddNextCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*AddNextCommand) Description

func (c *AddNextCommand) Description() string

Description returns the description for the command.

func (*AddNextCommand) Execute

func (c *AddNextCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*AddNextCommand) IsAdminCommand

func (c *AddNextCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type CacheSizeCommand

type CacheSizeCommand struct{}

CacheSizeCommand is a command that outputs the current size of the cache.

func (*CacheSizeCommand) Aliases

func (c *CacheSizeCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*CacheSizeCommand) Description

func (c *CacheSizeCommand) Description() string

Description returns the description for the command.

func (*CacheSizeCommand) Execute

func (c *CacheSizeCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*CacheSizeCommand) IsAdminCommand

func (c *CacheSizeCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type CurrentTrackCommand

type CurrentTrackCommand struct{}

CurrentTrackCommand is a command that outputs information related to the track that is currently playing (if one exists).

func (*CurrentTrackCommand) Aliases

func (c *CurrentTrackCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*CurrentTrackCommand) Description

func (c *CurrentTrackCommand) Description() string

Description returns the description for the command.

func (*CurrentTrackCommand) Execute

func (c *CurrentTrackCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*CurrentTrackCommand) IsAdminCommand

func (c *CurrentTrackCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type ForceSkipCommand

type ForceSkipCommand struct{}

ForceSkipCommand is a command that immediately skips the current track.

func (*ForceSkipCommand) Aliases

func (c *ForceSkipCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*ForceSkipCommand) Description

func (c *ForceSkipCommand) Description() string

Description returns the description for the command.

func (*ForceSkipCommand) Execute

func (c *ForceSkipCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*ForceSkipCommand) IsAdminCommand

func (c *ForceSkipCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type ForceSkipPlaylistCommand

type ForceSkipPlaylistCommand struct{}

ForceSkipPlaylistCommand is a command that immediately skips the current playlist.

func (*ForceSkipPlaylistCommand) Aliases

func (c *ForceSkipPlaylistCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*ForceSkipPlaylistCommand) Description

func (c *ForceSkipPlaylistCommand) Description() string

Description returns the description for the command.

func (*ForceSkipPlaylistCommand) Execute

func (c *ForceSkipPlaylistCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*ForceSkipPlaylistCommand) IsAdminCommand

func (c *ForceSkipPlaylistCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type HelpCommand

type HelpCommand struct{}

HelpCommand is a command that outputs a help message that shows the available commands and their aliases.

func (*HelpCommand) Aliases

func (c *HelpCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*HelpCommand) Description

func (c *HelpCommand) Description() string

Description returns the description for the command.

func (*HelpCommand) Execute

func (c *HelpCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*HelpCommand) IsAdminCommand

func (c *HelpCommand) IsAdminCommand() bool

IsAdminCommand returns true if the command is only for admin use, and returns false otherwise.

type JoinMeCommand

type JoinMeCommand struct{}

JoinMeCommand is a command that moves the bot to the channel of the user who issued the command.

func (*JoinMeCommand) Aliases

func (c *JoinMeCommand) Aliases() []string

Aliases returns the current aliases for the command.

func (*JoinMeCommand) Description

func (c *JoinMeCommand) Description() string

Description returns the description for the command.

func (*JoinMeCommand) Execute

func (c *JoinMeCommand) Execute(user *gumble.User, args ...string) (string, bool, error)

Execute executes the command with the given user and arguments. Return value descriptions:

string: A message to be returned to the user upon successful execution.
bool:   Whether the message should be private or not. true = private,
        false = public (sent to whole channel).
error:  An error message to be returned upon unsuccessful execution.
        If no error has occurred, pass nil instead.

Example return statement:

return "This is a private message!", true, nil

func (*JoinMeCommand) IsAdminCommand