Class DefaultPermissionAttribute
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Set the "Default Permission" property of an Application Command.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
[Obsolete("Soon to be deprecated, use Permissions-v2 attributes like EnabledInDmAttribute and DefaultMemberPermissionsAttribute")]
public class DefaultPermissionAttribute : Attribute
- Inheritance
-
DefaultPermissionAttribute
- Inherited Members
Constructors
DefaultPermissionAttribute(bool)
Set the default permission of a Slash Command.
public DefaultPermissionAttribute(bool isDefaultPermission)
Parameters
Properties
IsDefaultPermission
Gets whether the users are allowed to use a Slash Command by default or not.
public bool IsDefaultPermission { get; }