Documentation
¶
Index ¶
- Variables
- type AddCommand
- type AddLocalStorage
- type AddNextCommand
- type CacheSizeCommand
- type CurrentTrackCommand
- type ForceSkipCommand
- type ForceSkipPlaylistCommand
- type HelpCommand
- type JoinMeCommand
- type KillCommand
- type ListLocalStorageCommand
- type ListTracksCommand
- type MoveCommand
- type NextTrackCommand
- type NumCachedCommand
- type NumTracksCommand
- type PauseCommand
- type PlayAllLocalStorage
- type RegisterCommand
- type ResetCommand
- type ResumeCommand
- type SetCommentCommand
- type ShuffleCommand
- type SkipCommand
- type SkipPlaylistCommand
- type ToggleShuffleCommand
- type VersionCommand
- type VolumeCommand
Constants ¶
This section is empty.
Variables ¶
var Commands []interfaces.Command
Commands is a slice of all enabled commands.
var DJ *bot.MumbleDJ
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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