Oversight, missed /send in refactoring...

f317b1b764eb5013fd3d88defd91f5165890a58a

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +10 -2Ignore whitespace
public/scripts/slash-commands.js+10 -2
@@ -511,7 +511,7 @@ export function initDefaultSlashCommands() {
511 SlashCommandParser.addCommandObject(SlashCommand.fromProps({511 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
512 name: 'send',512 name: 'send',
513 callback: sendUserMessageCallback,513 callback: sendUserMessageCallback,
514 returns: 'The text of the sent message',514 returns: 'Optionally the text of the sent message, if specified in the "return" argument',
515 namedArgumentList: [515 namedArgumentList: [
516 new SlashCommandNamedArgument(516 new SlashCommandNamedArgument(
517 'compact',517 'compact',
@@ -534,6 +534,14 @@ export function initDefaultSlashCommands() {
534 defaultValue: '{{user}}',534 defaultValue: '{{user}}',
535 enumProvider: commonEnumProviders.personas,535 enumProvider: commonEnumProviders.personas,
536 }),536 }),
537 SlashCommandNamedArgument.fromProps({
538 name: 'return',
539 description: 'The way how you want the return value to be provided',
540 typeList: [ARGUMENT_TYPE.STRING],
541 defaultValue: 'none',
542 enumList: slashCommandReturnHelper.enumList({ allowObject: true }),
543 forceEnum: true,
544 }),
537 ],545 ],
538 unnamedArgumentList: [546 unnamedArgumentList: [
539 new SlashCommandArgument(547 new SlashCommandArgument(
@@ -2923,7 +2931,7 @@ async function sendUserMessageCallback(args, text) {
2923 message = await sendMessageAsUser(text, bias, insertAt, compact);2931 message = await sendMessageAsUser(text, bias, insertAt, compact);
2924 }2932 }
29252933
2926 return message.mes;2934 return await slashCommandReturnHelper.doReturn(args.return ?? 'none', message, { objectToStringFunc: x => x.mes });
2927}2935}
29282936
2929async function deleteMessagesByNameCallback(_, name) {2937async function deleteMessagesByNameCallback(_, name) {