| 180 | callback: (args, name) => { | 180 | callback: (args, name) => { |
| 181 | if (typeof name !== 'string') throw new Error('name must be a string'); | 181 | if (typeof name !== 'string') throw new Error('name must be a string'); |
| 182 | if (args.preferCurrent instanceof SlashCommandClosure || Array.isArray(args.preferCurrent)) throw new Error('preferCurrent cannot be a closure or array'); | 182 | 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'); |
| 183 | | 184 | |
| 184 | const char = findChar({ name: name, filteredByTags: validateArrayArgString(args.tag, 'tag'), preferCurrentChar: isTrueBoolean(args.preferCurrent) }); | 185 | const char = findChar({ name: name, filteredByTags: validateArrayArgString(args.tag, 'tag'), preferCurrentChar: isTrueBoolean(args.preferCurrent), quiet: isTrueBoolean(args.quiet) }); |
| 185 | return char?.avatar ?? ''; | 186 | return char?.avatar ?? ''; |
| 186 | }, | 187 | }, |
| 187 | returns: 'the avatar key (unique identifier) of the character', | 188 | returns: 'the avatar key (unique identifier) of the character', |