Class: SoundboardPlugin

SoundboardPlugin()

SoundboardPlugin supports playing sounds by typing commands. The config file has to be in the form:

Constructor

new SoundboardPlugin()

Source:
Example
{
    "sounds": [
        {
            "command": "mrgl",          //command to type
            "files":                    //files to play for command
            [
                "sounds/murloc0.mp3",
                "sounds/murloc1.mp3"
            ]
        }
    ]
}

Methods

chooseRandomSoundFile(sound) → {string}

Choose a sound file randomly from a sound object. If the sound contains only one sound file it chooses that one.
Parameters:
Name Type Description
sound object the sound object to choose the sound file from
Source:
Returns:
a path to the sound file
Type
string

playSoundFile(file, channel)

Join a channel and play a sound. If the sound object just has one sound file it chooses that one else it chooses one randomly.
Parameters:
Name Type Description
file object the sound file to play
channel VoiceChannel the channel to join
Source: