Browse Source

docs: add missing xmldoc for inherited properties and NotAGuildErrorMessage (#1301)

- adds inheritdoc tag to the inherited ErrorMessage properties of several attributes

- adds xmldoc summary for the NotAGuildErrorMessage properties
tags/2.1.0
Chris Johnston Christopher F 6 years ago
parent
commit
5ea3e113b8
5 changed files with 13 additions and 0 deletions
  1. +5
    -0
      src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs
  2. +1
    -0
      src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs
  3. +1
    -0
      src/Discord.Net.Commands/Attributes/Preconditions/RequireNsfwAttribute.cs
  4. +1
    -0
      src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs
  5. +5
    -0
      src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs

+ 5
- 0
src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs View File

@@ -17,7 +17,12 @@ namespace Discord.Commands
/// Gets the specified <see cref="Discord.ChannelPermission" /> of the precondition. /// Gets the specified <see cref="Discord.ChannelPermission" /> of the precondition.
/// </summary> /// </summary>
public ChannelPermission? ChannelPermission { get; } public ChannelPermission? ChannelPermission { get; }
/// <inheritdoc />
public override string ErrorMessage { get; set; } public override string ErrorMessage { get; set; }
/// <summary>
/// Gets or sets the error message if the precondition
/// fails due to being run outside of a Guild channel.
/// </summary>
public string NotAGuildErrorMessage { get; set; } public string NotAGuildErrorMessage { get; set; }


/// <summary> /// <summary>


+ 1
- 0
src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs View File

@@ -33,6 +33,7 @@ namespace Discord.Commands
/// Gets the context required to execute the command. /// Gets the context required to execute the command.
/// </summary> /// </summary>
public ContextType Contexts { get; } public ContextType Contexts { get; }
/// <inheritdoc />
public override string ErrorMessage { get; set; } public override string ErrorMessage { get; set; }


/// <summary> Requires the command to be invoked in the specified context. </summary> /// <summary> Requires the command to be invoked in the specified context. </summary>


+ 1
- 0
src/Discord.Net.Commands/Attributes/Preconditions/RequireNsfwAttribute.cs View File

@@ -30,6 +30,7 @@ namespace Discord.Commands
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequireNsfwAttribute : PreconditionAttribute public class RequireNsfwAttribute : PreconditionAttribute
{ {
/// <inheritdoc />
public override string ErrorMessage { get; set; } public override string ErrorMessage { get; set; }


/// <inheritdoc /> /// <inheritdoc />


+ 1
- 0
src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs View File

@@ -34,6 +34,7 @@ namespace Discord.Commands
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequireOwnerAttribute : PreconditionAttribute public class RequireOwnerAttribute : PreconditionAttribute
{ {
/// <inheritdoc />
public override string ErrorMessage { get; set; } public override string ErrorMessage { get; set; }


/// <inheritdoc /> /// <inheritdoc />


+ 5
- 0
src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs View File

@@ -17,7 +17,12 @@ namespace Discord.Commands
/// Gets the specified <see cref="Discord.ChannelPermission" /> of the precondition. /// Gets the specified <see cref="Discord.ChannelPermission" /> of the precondition.
/// </summary> /// </summary>
public ChannelPermission? ChannelPermission { get; } public ChannelPermission? ChannelPermission { get; }
/// <inheritdoc />
public override string ErrorMessage { get; set; } public override string ErrorMessage { get; set; }
/// <summary>
/// Gets or sets the error message if the precondition
/// fails due to being run outside of a Guild channel.
/// </summary>
public string NotAGuildErrorMessage { get; set; } public string NotAGuildErrorMessage { get; set; }


/// <summary> /// <summary>


Loading…
Cancel
Save