/char-find command to get a specific unique char

- findChar utility function that does the heavy lifting of finding a specific char based on conditions
- Log/warn if multiple characters match
- Validation function for named args that should be arrays
This commit is contained in:
Wolfsblvt
2024-09-29 00:36:13 +02:00
parent 20a82fb242
commit 0be48c567a
3 changed files with 138 additions and 14 deletions

View File

@ -15,13 +15,13 @@ import { SlashCommandScope } from './SlashCommandScope.js';
* _abortController:SlashCommandAbortController,
* _debugController:SlashCommandDebugController,
* _hasUnnamedArgument:boolean,
* [id:string]:string|SlashCommandClosure|(string|SlashCommandClosure)[],
* [id:string]:string|SlashCommandClosure|(string|SlashCommandClosure)[]|undefined,
* }} NamedArguments
*/
/**
* Alternative object for local JSDocs, where you don't need existing pipe, scope, etc. arguments
* @typedef {{[id:string]:string|SlashCommandClosure|(string|SlashCommandClosure)[]}} NamedArgumentsCapture
* @typedef {{[id:string]:string|SlashCommandClosure|(string|SlashCommandClosure)[]|undefined}} NamedArgumentsCapture
*/
/**