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() {
316316 enumProvider: commonEnumProviders.messages({ allowIdAfter: true }),
317317 }),
318318 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({
319324 name: 'return',
320325 description: 'The way how you want the return value to be provided',
321326 typeList: [ARGUMENT_TYPE.STRING],
@@ -3851,7 +3856,7 @@ export async function sendMessageAs(args, text) {
38513856
38523857export async function sendNarratorMessage(args, text) {
38533858 text = String(text ?? '');
38543859 const name = args.name ?? (chat_metadata[NARRATOR_NAME_KEY] || NARRATOR_NAME_DEFAULT);
38553860 // Messages that do nothing but set bias will be hidden from the context
38563861 const bias = extractMessageBias(text);
38573862 const isSystem = bias && !removeMacros(text).length;