public class RequireBotPermissionAttribute : PreconditionAttribute
public class RequireBotPermissionAttribute : PreconditionAttribute
@@ -18,7 +16,7 @@ namespace Discord.Commands
/// Require that the bot account has a specified GuildPermission
/// Require that the bot account has a specified GuildPermission
/// </summary>
/// </summary>
/// <remarks>This precondition will always fail if the command is being invoked in a private channel.</remarks>
/// <remarks>This precondition will always fail if the command is being invoked in a private channel.</remarks>
/// <param name="permission">The GuildPermission that the bot must have. Multiple permissions can be specified by ORing or ANDing the permissions together.</param>
/// <param name="permission">The GuildPermission that the bot must have. Multiple permissions can be specified by ORing the permissions together.</param>
public RequireBotPermissionAttribute(GuildPermission permission)
public RequireBotPermissionAttribute(GuildPermission permission)
{
{
GuildPermission = permission;
GuildPermission = permission;
@@ -27,7 +25,7 @@ namespace Discord.Commands
/// <summary>
/// <summary>
/// Require that the bot account has a specified ChannelPermission.
/// Require that the bot account has a specified ChannelPermission.
/// </summary>
/// </summary>
/// <param name="permission">The ChannelPermission that the bot must have. Multiple permissions can be specified by ORing or ANDing the permissions together.</param>
/// <param name="permission">The ChannelPermission that the bot must have. Multiple permissions can be specified by ORing the permissions together.</param>
/// Require that the command be invoked in a specified context.
/// Require that the command be invoked in a specified context.
/// </summary>
/// </summary>
/// <param name="contexts">The type of context the command can be invoked in. Multiple contexts can be speicifed by ORing the contexts together.</param>
/// <param name="contexts">The type of context the command can be invoked in. Multiple contexts can be specified by ORing the contexts together.</param>
/// Require that the user invoking the command has a specified GuildPermission
/// Require that the user invoking the command has a specified GuildPermission
/// </summary>
/// </summary>
/// <remarks>This precondition will always fail if the command is being invoked in a private channel.</remarks>
/// <remarks>This precondition will always fail if the command is being invoked in a private channel.</remarks>
/// <param name="permission">The GuildPermission that the user must have. Multiple permissions can be specified by ORing or ANDing the permissions together.</param>
/// <param name="permission">The GuildPermission that the user must have. Multiple permissions can be specified by ORing the permissions together.</param>
public RequireUserPermissionAttribute(GuildPermission permission)
public RequireUserPermissionAttribute(GuildPermission permission)
{
{
GuildPermission = permission;
GuildPermission = permission;
@@ -25,11 +25,11 @@ namespace Discord.Commands
/// <summary>
/// <summary>
/// Require that the user invoking the command has a specified ChannelPermission.
/// Require that the user invoking the command has a specified ChannelPermission.
/// </summary>
/// </summary>
/// <param name="permission">The ChannelPermission that the user must have. Multiple permissions can be specified by ORing or ANDing the permissions together.</param>
/// <param name="permission">The ChannelPermission that the user must have. Multiple permissions can be specified by ORing the permissions together.</param>
/// <example>
/// <example>
/// <code language="c#">
/// <code language="c#">
/// [Command("permission")]
/// [Command("permission")]
/// [RequireUserPermission(ChannelPermission.ReadMessageHistory & ChannelPermission.ReadMessages)]
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.