feature: Add a way to invoke a command specifying optional values by name (#1123)
* Add NamedArgumentTypeAttribute * Add NamedArgumentTypeReader * Fix superflous empty line. * Fix logic for quoted arguments * Throw an exception with a tailored message. * Add a catch to wrap parsing/input errors * Trim potential excess whitespace * Fix an off-by-one * Support to read an IEnumerable property * Add a doc * Add assertion for the collection test
This commit is contained in:
@@ -280,7 +280,7 @@ namespace Discord.Commands
|
||||
}
|
||||
}
|
||||
|
||||
private static TypeReader GetTypeReader(CommandService service, Type paramType, Type typeReaderType, IServiceProvider services)
|
||||
internal static TypeReader GetTypeReader(CommandService service, Type paramType, Type typeReaderType, IServiceProvider services)
|
||||
{
|
||||
var readers = service.GetTypeReaders(paramType);
|
||||
TypeReader reader = null;
|
||||
|
||||
Reference in New Issue
Block a user