Add argument to command

c677f0324a3a3fa808c1bea02ecb48c85d31cfe6

Cal <cal@clockworkcaracal.com>

1 files changed, +6 -1Showing whitespace changes
public/scripts/slash-commands.js+6 -1
@@ -316,6 +316,11 @@ export function initDefaultSlashCommands() {
316 enumProvider: commonEnumProviders.messages({ allowIdAfter: true }),316 enumProvider: commonEnumProviders.messages({ allowIdAfter: true }),
317 }),317 }),
318 SlashCommandNamedArgument.fromProps({318 SlashCommandNamedArgument.fromProps({
319 name: 'name',
320 description: 'Optional custom display name to use for this system narrator message.',
321 typeList: [ARGUMENT_TYPE.STRING],
322 }),
323 SlashCommandNamedArgument.fromProps({
319 name: 'return',324 name: 'return',
320 description: 'The way how you want the return value to be provided',325 description: 'The way how you want the return value to be provided',
321 typeList: [ARGUMENT_TYPE.STRING],326 typeList: [ARGUMENT_TYPE.STRING],
@@ -3851,7 +3856,7 @@ export async function sendMessageAs(args, text) {
38513856
3852export async function sendNarratorMessage(args, text) {3857export async function sendNarratorMessage(args, text) {
3853 text = String(text ?? '');3858 text = String(text ?? '');
3854 const name = chat_metadata[NARRATOR_NAME_KEY] || NARRATOR_NAME_DEFAULT;3859 const name = args.name ?? (chat_metadata[NARRATOR_NAME_KEY] || NARRATOR_NAME_DEFAULT);
3855 // Messages that do nothing but set bias will be hidden from the context3860 // Messages that do nothing but set bias will be hidden from the context
3856 const bias = extractMessageBias(text);3861 const bias = extractMessageBias(text);
3857 const isSystem = bias && !removeMacros(text).length;3862 const isSystem = bias && !removeMacros(text).length;