Small tts fix
All checks were successful
Build and publish / Build Container (push) Successful in 1m26s

This commit is contained in:
2026-03-03 20:23:59 -05:00
parent 5018311990
commit 6c2c3a0d07
2 changed files with 9 additions and 16 deletions

View File

@@ -107,10 +107,10 @@ const ai = new Ai({
emote: {type: 'string', description: 'Emote to the user', required: true, enum: ['none', ...Object.keys(settings.animations.emote)]}
},
fn: (args, stream) => {
if(!['none', ...Object.keys(settings.animations.emote)].includes(args.emote))
throw new Error(`Invalid emote, must be one of: ${['none', ...Object.keys(settings.animations.emote)].join(', ')}`)
stream({emote: args.emote});
return 'done!';
const exists = ['none', ...Object.keys(settings.animations.emote)].includes(args.emote);
if(!exists) stream({emote: 'none'});
else stream({emote: args.emote});
return exists ? 'done!' : `Invalid emote: ${args.emote}`;
}
}, {
name: 'personalize',