Added config fields

Updated voicemod library
Updated actions to be more reliable
This commit is contained in:
2023-11-20 23:41:24 -05:00
parent 8228396309
commit d1ef607952
3 changed files with 27 additions and 18 deletions

View File

@@ -7,13 +7,13 @@ module.exports = function (self) {
id: 'voiceId',
type: 'dropdown',
label: 'Voice',
default: 0,
default: self.vm.voices[0].id,
choices: self.vm.voices.map((item) => ({ id: item.id, label: item.name })),
},
],
callback: async (event) => {
const voiceId = event.options.voiceId
self.vm.voices[voiceId].load()
self.vm.internal.setVoice(voiceId)
},
},
set_beep_sound: {
@@ -40,25 +40,18 @@ module.exports = function (self) {
play_meme: {
name: 'Play Meme',
options: [
{
id: 'soundboardId',
type: 'dropdown',
label: 'Soundboard',
default: 0,
choices: self.vm.soundboards.map((item) => ({ id: item.id, label: item.name })),
},
{
id: 'memeId',
type: 'dropdown',
label: 'Meme',
default: 0,
choices: self.vm.soundboards.flat().map((item) => ({ id: item.id, label: item.name })),
},
],
callback: async (event) => {
console.log('in callback!')
const soundboardId = event.options.soundboardId
// console.log('in callback!')
const memeId = event.options.memeId
self.vm.soundboards[soundboardId][memeId].play()
self.vm.internal.playMeme(memeId)
},
},
stop_all_sounds: {