generated from ztimson/template
Small tts fix
All checks were successful
Build and publish / Build Container (push) Successful in 1m26s
All checks were successful
Build and publish / Build Container (push) Successful in 1m26s
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user