Constructor
new SoundboardPlugin()
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 |
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 |