Add "quiet" to /char-find

5a0e70e8fa377ca9cf6e9671c748852ef17e1de0

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +9 -1Ignore whitespace
public/scripts/slash-commands.js+9 -1
@@ -180,8 +180,9 @@ export function initDefaultSlashCommands() {
180180 callback: (args, name) => {
181181 if (typeof name !== 'string') throw new Error('name must be a string');
182182 if (args.preferCurrent instanceof SlashCommandClosure || Array.isArray(args.preferCurrent)) throw new Error('preferCurrent cannot be a closure or array');
183+ if (args.quiet instanceof SlashCommandClosure || Array.isArray(args.quiet)) throw new Error('quiet cannot be a closure or array');
183184
184185 const char = findChar({ name: name, filteredByTags: validateArrayArgString(args.tag, 'tag'), preferCurrentChar: isTrueBoolean(args.preferCurrent), quiet: isTrueBoolean(args.quiet) });
185186 return char?.avatar ?? '';
186187 },
187188 returns: 'the avatar key (unique identifier) of the character',
@@ -199,6 +200,13 @@ export function initDefaultSlashCommands() {
199200 typeList: [ARGUMENT_TYPE.BOOLEAN],
200201 defaultValue: 'true',
201202 }),
203+ SlashCommandNamedArgument.fromProps({
204+ name: 'quiet',
205+ description: 'Do not show warning if multiple charactrers are found',
206+ typeList: [ARGUMENT_TYPE.BOOLEAN],
207+ defaultValue: 'false',
208+ enumProvider: commonEnumProviders.boolean('trueFalse'),
209+ }),
202210 ],
203211 unnamedArgumentList: [
204212 SlashCommandArgument.fromProps({