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() {
511511 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
512512 name: 'send',
513513 callback: sendUserMessageCallback,
514514 returns: 'TheOptionally the text of the sent message, if specified in the "return" argument',
515515 namedArgumentList: [
516516 new SlashCommandNamedArgument(
517517 'compact',
@@ -534,6 +534,14 @@ export function initDefaultSlashCommands() {
534534 defaultValue: '{{user}}',
535535 enumProvider: commonEnumProviders.personas,
536536 }),
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+ }),
537545 ],
538546 unnamedArgumentList: [
539547 new SlashCommandArgument(
@@ -2923,7 +2931,7 @@ async function sendUserMessageCallback(args, text) {
29232931 message = await sendMessageAsUser(text, bias, insertAt, compact);
29242932 }
29252933
2926- return message.mes;
2934+ return await slashCommandReturnHelper.doReturn(args.return ?? 'none', message, { objectToStringFunc: x => x.mes });
29272935}
29282936
29292937async function deleteMessagesByNameCallback(_, name) {