| @@ -15,10 +15,10 @@ namespace Discord.Commands | |||||
| // Brief summary of method/module/parameter | // Brief summary of method/module/parameter | ||||
| [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Parameter)] | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Parameter)] | ||||
| public class SynopsisAttribute : Attribute | |||||
| public class SummaryAttribute : Attribute | |||||
| { | { | ||||
| public string Text { get; } | public string Text { get; } | ||||
| public SynopsisAttribute(string text) | |||||
| public SummaryAttribute(string text) | |||||
| { | { | ||||
| Text = text; | Text = text; | ||||
| } | } | ||||
| @@ -15,7 +15,7 @@ namespace Discord.Commands | |||||
| public string Name { get; } | public string Name { get; } | ||||
| public string Description { get; } | public string Description { get; } | ||||
| public string Synopsis { get; } | |||||
| public string Summary { get; } | |||||
| public string Text { get; } | public string Text { get; } | ||||
| public Module Module { get; } | public Module Module { get; } | ||||
| public IReadOnlyList<CommandParameter> Parameters { get; } | public IReadOnlyList<CommandParameter> Parameters { get; } | ||||
| @@ -32,9 +32,9 @@ namespace Discord.Commands | |||||
| if (description != null) | if (description != null) | ||||
| Description = description.Text; | Description = description.Text; | ||||
| var synopsis = methodInfo.GetCustomAttribute<SynopsisAttribute>(); | |||||
| if (synopsis != null) | |||||
| Synopsis = synopsis.Text; | |||||
| var summary = methodInfo.GetCustomAttribute<SummaryAttribute>(); | |||||
| if (summary != null) | |||||
| Summary = summary.Text; | |||||
| Parameters = BuildParameters(methodInfo); | Parameters = BuildParameters(methodInfo); | ||||
| _action = BuildAction(methodInfo); | _action = BuildAction(methodInfo); | ||||
| @@ -9,7 +9,7 @@ namespace Discord.Commands | |||||
| { | { | ||||
| public CommandService Service { get; } | public CommandService Service { get; } | ||||
| public string Name { get; } | public string Name { get; } | ||||
| public string Synopsis { get; } | |||||
| public string Summary { get; } | |||||
| public string Description { get; } | public string Description { get; } | ||||
| public IEnumerable<Command> Commands { get; } | public IEnumerable<Command> Commands { get; } | ||||
| internal object Instance { get; } | internal object Instance { get; } | ||||
| @@ -20,9 +20,9 @@ namespace Discord.Commands | |||||
| Name = typeInfo.Name; | Name = typeInfo.Name; | ||||
| Instance = instance; | Instance = instance; | ||||
| var synopsisAttr = typeInfo.GetCustomAttribute<SynopsisAttribute>(); | |||||
| if (synopsisAttr != null) | |||||
| Synopsis = synopsisAttr.Text; | |||||
| var summaryAttr = typeInfo.GetCustomAttribute<SummaryAttribute>(); | |||||
| if (summaryAttr != null) | |||||
| Summary = summaryAttr.Text; | |||||
| var descriptionAttr = typeInfo.GetCustomAttribute<DescriptionAttribute>(); | var descriptionAttr = typeInfo.GetCustomAttribute<DescriptionAttribute>(); | ||||
| if (descriptionAttr != null) | if (descriptionAttr != null) | ||||