Merge pull request #3946 from InspectorCaracal/add-sys-name Add a named argument of "name" to the `/sys` slash command
Signed| @@ -316,6 +316,11 @@ export function initDefaultSlashCommands() { | ||
| 316 | 316 | enumProvider: commonEnumProviders.messages({ allowIdAfter: true }), |
| 317 | 317 | }), |
| 318 | 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 | 324 | name: 'return', |
| 320 | 325 | description: 'The way how you want the return value to be provided', |
| 321 | 326 | typeList: [ARGUMENT_TYPE.STRING], |
| @@ -3851,7 +3856,7 @@ export async function sendMessageAs(args, text) { | ||
| 3851 | 3856 | |
| 3852 | 3857 | export async function sendNarratorMessage(args, text) { |
| 3853 | 3858 | text = String(text ?? ''); |
| 3854 | 3859 | const name = args.name ?? (chat_metadata[NARRATOR_NAME_KEY] || NARRATOR_NAME_DEFAULT); |
| 3855 | 3860 | // Messages that do nothing but set bias will be hidden from the context |
| 3856 | 3861 | const bias = extractMessageBias(text); |
| 3857 | 3862 | const isSystem = bias && !removeMacros(text).length; |