Improve command documentation features

This commit is contained in:
Finite Reality
2016-08-02 21:05:11 +01:00
parent 3856d43587
commit 8c0d4b6123
3 changed files with 9 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ namespace Discord.Commands
throw new InvalidOperationException("Remainder parameters must be the last parameter in a command.");
string name = parameter.Name;
string description = typeInfo.GetCustomAttribute<DescriptionAttribute>()?.Text;
string description = parameter.GetCustomAttribute<DescriptionAttribute>()?.Text;
bool isOptional = parameter.IsOptional;
object defaultValue = parameter.HasDefaultValue ? parameter.DefaultValue : null;