diff --git a/src/Discord.Net.Commands/Attributes/NamedArgumentTypeAttribute.cs b/src/Discord.Net.Commands/Attributes/NamedArgumentTypeAttribute.cs index 0899f6e1b..a43286110 100644 --- a/src/Discord.Net.Commands/Attributes/NamedArgumentTypeAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/NamedArgumentTypeAttribute.cs @@ -2,6 +2,10 @@ using System; namespace Discord.Commands { + /// + /// Instructs the command system to treat command paramters of this type + /// as a collection of named arguments matching to its properties. + /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public sealed class NamedArgumentTypeAttribute : Attribute { } } diff --git a/test/Discord.Net.Tests/Tests.TypeReaders.cs b/test/Discord.Net.Tests/Tests.TypeReaders.cs index 63083bc6b..3d1325c59 100644 --- a/test/Discord.Net.Tests/Tests.TypeReaders.cs +++ b/test/Discord.Net.Tests/Tests.TypeReaders.cs @@ -25,7 +25,7 @@ namespace Discord Assert.NotNull(param); Assert.True(param.IsRemainder); - var result = await param.ParseAsync(null, "foo: 42 bar: hello"); + var result = await param.ParseAsync(null, "bar: hello foo: 42"); Assert.True(result.IsSuccess); var m = result.BestMatch as ArgumentType; @@ -51,7 +51,7 @@ namespace Discord Assert.NotNull(param); Assert.True(param.IsRemainder); - var result = await param.ParseAsync(null, "bar: 《hello》 foo: 42"); + var result = await param.ParseAsync(null, "foo: 42 bar: 《hello》"); Assert.True(result.IsSuccess); var m = result.BestMatch as ArgumentType;