diff --git a/src/Discord.Net.Commands/Command.cs b/src/Discord.Net.Commands/Command.cs index fe5352478..5d81e0924 100644 --- a/src/Discord.Net.Commands/Command.cs +++ b/src/Discord.Net.Commands/Command.cs @@ -103,11 +103,11 @@ namespace Discord.Commands throw new InvalidOperationException("Remainder parameters must be the last parameter in a command."); string name = parameter.Name; - string description = parameter.GetCustomAttribute()?.Text; + string summary = parameter.GetCustomAttribute()?.Text; bool isOptional = parameter.IsOptional; object defaultValue = parameter.HasDefaultValue ? parameter.DefaultValue : null; - paramBuilder.Add(new CommandParameter(name, description, type, reader, isOptional, isRemainder, isMultiple, defaultValue)); + paramBuilder.Add(new CommandParameter(name, summary, type, reader, isOptional, isRemainder, isMultiple, defaultValue)); } return paramBuilder.ToImmutable(); } diff --git a/src/Discord.Net.Commands/CommandParameter.cs b/src/Discord.Net.Commands/CommandParameter.cs index f18b1a13b..f0b6f16b3 100644 --- a/src/Discord.Net.Commands/CommandParameter.cs +++ b/src/Discord.Net.Commands/CommandParameter.cs @@ -10,17 +10,17 @@ namespace Discord.Commands private readonly TypeReader _reader; public string Name { get; } - public string Description { get; } + public string Summary { get; } public bool IsOptional { get; } public bool IsRemainder { get; } public bool IsMultiple { get; } public Type Type { get; } internal object DefaultValue { get; } - public CommandParameter(string name, string description, Type type, TypeReader reader, bool isOptional, bool isRemainder, bool isMultiple, object defaultValue) + public CommandParameter(string name, string summary, Type type, TypeReader reader, bool isOptional, bool isRemainder, bool isMultiple, object defaultValue) { Name = name; - Description = description; + Summary = summary; Type = type; _reader = reader; IsOptional = isOptional; diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index 3ecd77c1d..2ce7c5517 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -16,7 +16,8 @@ namespace Discord.Commands private readonly ConcurrentDictionary _typeReaders; private readonly CommandMap _map; - public ILookup Commands => _modules.SelectMany(x => x.Value.Commands).ToLookup(x => x.Module); + public IEnumerable Modules => _modules.Select(x => x.Value); + public IEnumerable Commands => _modules.SelectMany(x => x.Value.Commands); public CommandService() {