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:
Joe4evr
2018-11-07 00:36:44 +01:00
committed by Christopher F
parent 8ef5f8120f
commit 419c0a5b53
7 changed files with 369 additions and 9 deletions

View File

@@ -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;