From 08ae9e4e86995a37fdcf9610d02290328f376f93 Mon Sep 17 00:00:00 2001 From: RogueException Date: Sun, 27 Nov 2016 01:13:29 -0400 Subject: [PATCH] Fixed logic in precondition attribute docstrings --- .../Preconditions/RequireBotPermissionAttribute.cs | 8 +++----- .../Attributes/Preconditions/RequireContextAttribute.cs | 2 +- .../Attributes/Preconditions/RequireOwnerAttribute.cs | 3 --- .../Preconditions/RequireUserPermissionAttribute.cs | 6 +++--- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs b/src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs index 914978192..9f0e3c905 100644 --- a/src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs @@ -1,12 +1,10 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Threading.Tasks; namespace Discord.Commands { /// - /// This attribute requires that the bot has a speicifed permission in the channel a command is invoked in. + /// This attribute requires that the bot has a specified permission in the channel a command is invoked in. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class RequireBotPermissionAttribute : PreconditionAttribute @@ -18,7 +16,7 @@ namespace Discord.Commands /// Require that the bot account has a specified GuildPermission /// /// This precondition will always fail if the command is being invoked in a private channel. - /// The GuildPermission that the bot must have. Multiple permissions can be specified by ORing or ANDing the permissions together. + /// The GuildPermission that the bot must have. Multiple permissions can be specified by ORing the permissions together. public RequireBotPermissionAttribute(GuildPermission permission) { GuildPermission = permission; @@ -27,7 +25,7 @@ namespace Discord.Commands /// /// Require that the bot account has a specified ChannelPermission. /// - /// The ChannelPermission that the bot must have. Multiple permissions can be specified by ORing or ANDing the permissions together. + /// The ChannelPermission that the bot must have. Multiple permissions can be specified by ORing the permissions together. /// /// /// [Command("permission")] diff --git a/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs b/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs index beadbbc89..bc5d9af58 100644 --- a/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs @@ -22,7 +22,7 @@ namespace Discord.Commands /// /// Require that the command be invoked in a specified context. /// - /// The type of context the command can be invoked in. Multiple contexts can be speicifed by ORing the contexts together. + /// The type of context the command can be invoked in. Multiple contexts can be specified by ORing the contexts together. /// /// /// [Command("private_only")] diff --git a/src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs b/src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs index 8992cd115..5b290954c 100644 --- a/src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Threading.Tasks; -using Discord; namespace Discord.Commands { diff --git a/src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs b/src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs index a5b04bd73..04e221008 100644 --- a/src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs @@ -16,7 +16,7 @@ namespace Discord.Commands /// Require that the user invoking the command has a specified GuildPermission /// /// This precondition will always fail if the command is being invoked in a private channel. - /// The GuildPermission that the user must have. Multiple permissions can be specified by ORing or ANDing the permissions together. + /// The GuildPermission that the user must have. Multiple permissions can be specified by ORing the permissions together. public RequireUserPermissionAttribute(GuildPermission permission) { GuildPermission = permission; @@ -25,11 +25,11 @@ namespace Discord.Commands /// /// Require that the user invoking the command has a specified ChannelPermission. /// - /// The ChannelPermission that the user must have. Multiple permissions can be specified by ORing or ANDing the permissions together. + /// The ChannelPermission that the user must have. Multiple permissions can be specified by ORing the permissions together. /// /// /// [Command("permission")] - /// [RequireUserPermission(ChannelPermission.ReadMessageHistory & ChannelPermission.ReadMessages)] + /// [RequireUserPermission(ChannelPermission.ReadMessageHistory | ChannelPermission.ReadMessages)] /// public async Task HasPermission() /// { /// await ReplyAsync("You can read messages and the message history!");