commands

package
v4.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: MIT Imports: 13 Imported by: 1

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.

View Source
var SUPPORTED_AUDIO_SUFFIXES = [...]string{"", ".mp3", ".ogg", ".wav", ".m4a", ".webm", ".opus", ".flac", ".aiff", ".aac", ".avi"}

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 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 GreetCommand

type GreetCommand struct{}

GreetCommand is a command that plays an audio track as a greeting to a user

func (*GreetCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*GreetCommand) Description

func (c *GreetCommand) Description() string

Description returns the description for the command.

func (*GreetCommand) Execute

func (c *GreetCommand) 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 (*GreetCommand) IsAdminCommand

func (c *GreetCommand) 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

func (c *JoinMeCommand) IsAdminCommand() bool

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

type KillCommand

type KillCommand struct{}

KillCommand is a command that safely kills the bot.

func (*KillCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*KillCommand) Description

func (c *KillCommand) Description() string

Description returns the description for the command.

func (*KillCommand) Execute

func (c *KillCommand) 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 (*KillCommand) IsAdminCommand

func (c *KillCommand) IsAdminCommand() bool

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

type ListTracksCommand

type ListTracksCommand struct{}

ListTracksCommand is a command that lists the tracks that are currently in the queue.

func (*ListTracksCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*ListTracksCommand) Description

func (c *ListTracksCommand) Description() string

Description returns the description for the command.

func (*ListTracksCommand) Execute

func (c *ListTracksCommand) 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 (*ListTracksCommand) IsAdminCommand

func (c *ListTracksCommand) IsAdminCommand() bool

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

type MoveCommand

type MoveCommand struct{}

MoveCommand is a command that moves the bot from one channel to another.

func (*MoveCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*MoveCommand) Description

func (c *MoveCommand) Description() string

Description returns the description for the command.

func (*MoveCommand) Execute

func (c *MoveCommand) 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 (*MoveCommand) IsAdminCommand

func (c *MoveCommand) IsAdminCommand() bool

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

type NextTrackCommand

type NextTrackCommand struct{}

NextTrackCommand is a command that outputs information related to the next track in the queue (if one exists).

func (*NextTrackCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*NextTrackCommand) Description

func (c *NextTrackCommand) Description() string

Description returns the description for the command.

func (*NextTrackCommand) Execute

func (c *NextTrackCommand) 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 (*NextTrackCommand) IsAdminCommand

func (c *NextTrackCommand) IsAdminCommand() bool

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

type NumCachedCommand

type NumCachedCommand struct{}

NumCachedCommand is a command that outputs the number of tracks that are currently cached on disk (if caching is enabled).

func (*NumCachedCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*NumCachedCommand) Description

func (c *NumCachedCommand) Description() string

Description returns the description for the command.

func (*NumCachedCommand) Execute

func (c *NumCachedCommand) 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 (*NumCachedCommand) IsAdminCommand

func (c *NumCachedCommand) IsAdminCommand() bool

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

type NumTracksCommand

type NumTracksCommand struct{}

NumTracksCommand is a command that outputs the current number of tracks in the queue.

func (*NumTracksCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*NumTracksCommand) Description

func (c *NumTracksCommand) Description() string

Description returns the description for the command.

func (*NumTracksCommand) Execute

func (c *NumTracksCommand) 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 (*NumTracksCommand) IsAdminCommand

func (c *NumTracksCommand) IsAdminCommand() bool

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

type PauseCommand

type PauseCommand struct{}

PauseCommand is a command that pauses audio playback.

func (*PauseCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*PauseCommand) Description

func (c *PauseCommand) Description() string

Description returns the description for the command.

func (*PauseCommand) Execute

func (c *PauseCommand) 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 (*PauseCommand) IsAdminCommand

func (c *PauseCommand) IsAdminCommand() bool

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

type RegisterCommand

type RegisterCommand struct{}

RegisterCommand is a command that registers the bot on the server.

func (*RegisterCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*RegisterCommand) Description

func (c *RegisterCommand) Description() string

Description returns the description for the command.

func (*RegisterCommand) Execute

func (c *RegisterCommand) 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 (*RegisterCommand) IsAdminCommand

func (c *RegisterCommand) IsAdminCommand() bool

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

type ReloadCommand

type ReloadCommand struct{}

ReloadCommand is a command that reloads the configuration values for the bot from a config file.

func (*ReloadCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*ReloadCommand) Description

func (c *ReloadCommand) Description() string

Description returns the description for the command.

func (*ReloadCommand) Execute

func (c *ReloadCommand) 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 (*ReloadCommand) IsAdminCommand

func (c *ReloadCommand) IsAdminCommand() bool

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

type ResetCommand

type ResetCommand struct{}

ResetCommand is a command that resets the queue and cache.

func (*ResetCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*ResetCommand) Description

func (c *ResetCommand) Description() string

Description returns the description for the command.

func (*ResetCommand) Execute

func (c *ResetCommand) 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 (*ResetCommand) IsAdminCommand

func (c *ResetCommand) IsAdminCommand() bool

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

type ResumeCommand

type ResumeCommand struct{}

ResumeCommand is a command that resumes audio playback.

func (*ResumeCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*ResumeCommand) Description

func (c *ResumeCommand) Description() string

Description returns the description for the command.

func (*ResumeCommand) Execute

func (c *ResumeCommand) 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 (*ResumeCommand) IsAdminCommand

func (c *ResumeCommand) IsAdminCommand() bool

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

type SetCommentCommand

type SetCommentCommand struct{}

SetCommentCommand is a command that changes the Mumble comment of the bot.

func (*SetCommentCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*SetCommentCommand) Description

func (c *SetCommentCommand) Description() string

Description returns the description for the command.

func (*SetCommentCommand) Execute

func (c *SetCommentCommand) 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 (*SetCommentCommand) IsAdminCommand

func (c *SetCommentCommand) IsAdminCommand() bool

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

type ShuffleCommand

type ShuffleCommand struct{}

ShuffleCommand is a command that shuffles the audio queue.

func (*ShuffleCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*ShuffleCommand) Description

func (c *ShuffleCommand) Description() string

Description returns the description for the command.

func (*ShuffleCommand) Execute

func (c *ShuffleCommand) 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 (*ShuffleCommand) IsAdminCommand

func (c *ShuffleCommand) IsAdminCommand() bool

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

type SkipCommand

type SkipCommand struct{}

SkipCommand is a command that places a vote to skip the current track.

func (*SkipCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*SkipCommand) Description

func (c *SkipCommand) Description() string

Description returns the description for the command.

func (*SkipCommand) Execute

func (c *SkipCommand) 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 (*SkipCommand) IsAdminCommand

func (c *SkipCommand) IsAdminCommand() bool

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

type SkipPlaylistCommand

type SkipPlaylistCommand struct{}

SkipPlaylistCommand is a command that places a vote to skip the current playlist.

func (*SkipPlaylistCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*SkipPlaylistCommand) Description

func (c *SkipPlaylistCommand) Description() string

Description returns the description for the command.

func (*SkipPlaylistCommand) Execute

func (c *SkipPlaylistCommand) 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 (*SkipPlaylistCommand) IsAdminCommand

func (c *SkipPlaylistCommand) IsAdminCommand() bool

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

type ToggleShuffleCommand

type ToggleShuffleCommand struct{}

ToggleShuffleCommand is a command that changes the Mumble comment of the bot.

func (*ToggleShuffleCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*ToggleShuffleCommand) Description

func (c *ToggleShuffleCommand) Description() string

Description returns the description for the command.

func (*ToggleShuffleCommand) Execute

func (c *ToggleShuffleCommand) 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 (*ToggleShuffleCommand) IsAdminCommand

func (c *ToggleShuffleCommand) IsAdminCommand() bool

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

type VersionCommand

type VersionCommand struct{}

VersionCommand is a command that outputs the local MumbleDJ version.

func (*VersionCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*VersionCommand) Description

func (c *VersionCommand) Description() string

Description returns the description for the command.

func (*VersionCommand) Execute

func (c *VersionCommand) 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 (*VersionCommand) IsAdminCommand

func (c *VersionCommand) IsAdminCommand() bool

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

type VolumeCommand

type VolumeCommand struct{}

VolumeCommand is a command that changes the volume of the audio output.

func (*VolumeCommand) Aliases

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

Aliases returns the current aliases for the command.

func (*VolumeCommand) Description

func (c *VolumeCommand) Description() string

Description returns the description for the command.

func (*VolumeCommand) Execute

func (c *VolumeCommand) 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 (*VolumeCommand) IsAdminCommand

func (c *VolumeCommand) IsAdminCommand() bool

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

Jump to

Keyboard shortcuts

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