diff --git a/src/Discord.Net.Commands/Attributes/DescriptionAttribute.cs b/src/Discord.Net.Commands/Attributes/DescriptionAttribute.cs index 736e9720b..db9c57057 100644 --- a/src/Discord.Net.Commands/Attributes/DescriptionAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/DescriptionAttribute.cs @@ -11,4 +11,14 @@ namespace Discord.Commands Text = text; } } + + [AttributeUsage(AttributeTargets.Method)] + public class SynopsisAttribute : Attribute + { + public string Text { get; } + public SynopsisAttribute(string text) + { + Text = text; + } + } } diff --git a/src/Discord.Net.Commands/Command.cs b/src/Discord.Net.Commands/Command.cs index cdbdb1080..f62d6c928 100644 --- a/src/Discord.Net.Commands/Command.cs +++ b/src/Discord.Net.Commands/Command.cs @@ -15,6 +15,7 @@ namespace Discord.Commands public string Name { get; } public string Description { get; } + public string Synopsis { get; } public string Text { get; } public Module Module { get; } public IReadOnlyList Parameters { get; } @@ -31,6 +32,10 @@ namespace Discord.Commands if (description != null) Description = description.Text; + var synopsis = methodInfo.GetCustomAttribute(); + if (synopsis != null) + Synopsis = synopsis.Text; + Parameters = BuildParameters(methodInfo); _action = BuildAction(methodInfo); }