Repository navigation
v1.0.0-ALPHA.18
Pre-release-
[BREAKING][discord]: The
argsproperty inICommandContextis now aMap<string, MsgArgs>instead ofMsgArgs[];- Arguments are now keyed by their parameter name (lowercase), matching the behavior of slash commands;
- This affects both legacy (prefix) commands and slash commands;
- Update any code that accesses
context.argsby index (e.g.args[0]) to useargs.get('paramName')instead;
-
[FEAT][discord]: Legacy commands now support named arguments;
- Arguments can be passed by name using the
--name=valueor-name:valuesyntax, in addition to the traditional positional syntax; - Positional and named arguments can be mixed freely;
- Arguments can be passed by name using the
-
[FEAT][discord]: The last
Stringparameter of a legacy command now automatically captures all remaining positional tokens as a single joined string; -
[FIX][discord]: Passing extra positional arguments that exceed the command's parameter count now returns a clear error message instead of silently being appended to the last argument;
- Unknown named arguments also produce a clear error message;
-
[FIX][discord]: User, channel, and role resolution now correctly strips mention formatting (e.g.
<@123>,<#456>,<@&789>) before resolving by ID; -
[FIX][discord]: Integer validation now uses a strict regex (
/^-?\d+$/) instead ofparseInt, preventing strings like"12abc"from being accepted as valid integers; -
[FIX][discord]: Number validation now uses
Number()instead ofparseFloat, improving consistency with JavaScript's standard numeric coercion; -
[FIX][discord]: Subcommand and SubcommandGroup option types are now excluded from parameter iteration and the usage string, preventing them from being treated as regular arguments;
-
[CHORE]: Bump dependencies;