mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Oversight, missed /send in refactoring...
This commit is contained in:
parent
7a1b43eb89
commit
f317b1b764
@ -511,7 +511,7 @@ export function initDefaultSlashCommands() {
|
||||
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
|
||||
name: 'send',
|
||||
callback: sendUserMessageCallback,
|
||||
returns: 'The text of the sent message',
|
||||
returns: 'Optionally the text of the sent message, if specified in the "return" argument',
|
||||
namedArgumentList: [
|
||||
new SlashCommandNamedArgument(
|
||||
'compact',
|
||||
@ -534,6 +534,14 @@ export function initDefaultSlashCommands() {
|
||||
defaultValue: '{{user}}',
|
||||
enumProvider: commonEnumProviders.personas,
|
||||
}),
|
||||
SlashCommandNamedArgument.fromProps({
|
||||
name: 'return',
|
||||
description: 'The way how you want the return value to be provided',
|
||||
typeList: [ARGUMENT_TYPE.STRING],
|
||||
defaultValue: 'none',
|
||||
enumList: slashCommandReturnHelper.enumList({ allowObject: true }),
|
||||
forceEnum: true,
|
||||
}),
|
||||
],
|
||||
unnamedArgumentList: [
|
||||
new SlashCommandArgument(
|
||||
@ -2923,7 +2931,7 @@ async function sendUserMessageCallback(args, text) {
|
||||
message = await sendMessageAsUser(text, bias, insertAt, compact);
|
||||
}
|
||||
|
||||
return message.mes;
|
||||
return await slashCommandReturnHelper.doReturn(args.return ?? 'none', message, { objectToStringFunc: x => x.mes });
|
||||
}
|
||||
|
||||
async function deleteMessagesByNameCallback(_, name) {
|
||||
|
Loading…
Reference in New Issue
Block a user