Struct OverwritePermissions
Represents a container for a series of overwrite permissions.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Assembly: Discord.Net.Core.dll
Syntax
public struct OverwritePermissions
Constructors
|
Improve this Doc
View Source
OverwritePermissions(PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue)
Declaration
public OverwritePermissions(PermValue createInstantInvite = PermValue.Inherit, PermValue manageChannel = PermValue.Inherit, PermValue addReactions = PermValue.Inherit, PermValue viewChannel = PermValue.Inherit, PermValue sendMessages = PermValue.Inherit, PermValue sendTTSMessages = PermValue.Inherit, PermValue manageMessages = PermValue.Inherit, PermValue embedLinks = PermValue.Inherit, PermValue attachFiles = PermValue.Inherit, PermValue readMessageHistory = PermValue.Inherit, PermValue mentionEveryone = PermValue.Inherit, PermValue useExternalEmojis = PermValue.Inherit, PermValue connect = PermValue.Inherit, PermValue speak = PermValue.Inherit, PermValue muteMembers = PermValue.Inherit, PermValue deafenMembers = PermValue.Inherit, PermValue moveMembers = PermValue.Inherit, PermValue useVoiceActivation = PermValue.Inherit, PermValue manageRoles = PermValue.Inherit, PermValue manageWebhooks = PermValue.Inherit)
Parameters
|
Improve this Doc
View Source
OverwritePermissions(UInt64, UInt64)
Creates a new OverwritePermissions with the provided allow and deny packed values.
Declaration
public OverwritePermissions(ulong allowValue, ulong denyValue)
Parameters
| Type |
Name |
Description |
| System.UInt64 |
allowValue |
|
| System.UInt64 |
denyValue |
|
Properties
|
Improve this Doc
View Source
AddReactions
If Allowed, a user may add reactions.
Declaration
public PermValue AddReactions { get; }
Property Value
|
Improve this Doc
View Source
AllowValue
Declaration
public ulong AllowValue { get; }
Property Value
| Type |
Description |
| System.UInt64 |
|
|
Improve this Doc
View Source
AttachFiles
If Allowed, a user may send files.
Declaration
public PermValue AttachFiles { get; }
Property Value
|
Improve this Doc
View Source
Connect
If Allowed, a user may connect to a voice channel.
Declaration
public PermValue Connect { get; }
Property Value
|
Improve this Doc
View Source
CreateInstantInvite
If Allowed, a user may create invites.
Declaration
public PermValue CreateInstantInvite { get; }
Property Value
|
Improve this Doc
View Source
DeafenMembers
If Allowed, a user may deafen users.
Declaration
public PermValue DeafenMembers { get; }
Property Value
|
Improve this Doc
View Source
DenyValue
Declaration
public ulong DenyValue { get; }
Property Value
| Type |
Description |
| System.UInt64 |
|
|
Improve this Doc
View Source
EmbedLinks
If Allowed, Discord will auto-embed links sent by this user.
Declaration
public PermValue EmbedLinks { get; }
Property Value
|
Improve this Doc
View Source
InheritAll
Declaration
public static OverwritePermissions InheritAll { get; }
Property Value
|
Improve this Doc
View Source
ManageChannel
If Allowed, a user may create, delete and modify this channel.
Declaration
public PermValue ManageChannel { get; }
Property Value
|
Improve this Doc
View Source
ManageMessages
If Allowed, a user may delete messages.
Declaration
public PermValue ManageMessages { get; }
Property Value
|
Improve this Doc
View Source
ManageRoles
If Allowed, a user may adjust role permissions. This also implicitly grants all other permissions.
Declaration
public PermValue ManageRoles { get; }
Property Value
|
Improve this Doc
View Source
ManageWebhooks
If True, a user may edit the webhooks for this channel.
Declaration
public PermValue ManageWebhooks { get; }
Property Value
|
Improve this Doc
View Source
MentionEveryone
If Allowed, a user may mention @everyone.
Declaration
public PermValue MentionEveryone { get; }
Property Value
|
Improve this Doc
View Source
MoveMembers
If Allowed, a user may move other users between voice channels.
Declaration
public PermValue MoveMembers { get; }
Property Value
|
Improve this Doc
View Source
MuteMembers
If Allowed, a user may mute users.
Declaration
public PermValue MuteMembers { get; }
Property Value
|
Improve this Doc
View Source
ReadMessageHistory
If Allowed, a user may read previous messages.
Declaration
public PermValue ReadMessageHistory { get; }
Property Value
|
Improve this Doc
View Source
ReadMessages
If Allowed, a user may join channels.
Declaration
[Obsolete("Use ViewChannel instead.")]
public PermValue ReadMessages { get; }
Property Value
|
Improve this Doc
View Source
SendMessages
If Allowed, a user may send messages.
Declaration
public PermValue SendMessages { get; }
Property Value
|
Improve this Doc
View Source
SendTTSMessages
If Allowed, a user may send text-to-speech messages.
Declaration
public PermValue SendTTSMessages { get; }
Property Value
|
Improve this Doc
View Source
Speak
If Allowed, a user may speak in a voice channel.
Declaration
public PermValue Speak { get; }
Property Value
|
Improve this Doc
View Source
UseExternalEmojis
If Allowed, a user may use custom emoji from other guilds.
Declaration
public PermValue UseExternalEmojis { get; }
Property Value
|
Improve this Doc
View Source
UseVAD
If Allowed, a user may use voice-activity-detection rather than push-to-talk.
Declaration
public PermValue UseVAD { get; }
Property Value
|
Improve this Doc
View Source
ViewChannel
If Allowed, a user may join channels.
Declaration
public PermValue ViewChannel { get; }
Property Value
Methods
|
Improve this Doc
View Source
AllowAll(IChannel)
Declaration
public static OverwritePermissions AllowAll(IChannel channel)
Parameters
Returns
Exceptions
| Type |
Condition |
| System.ArgumentException |
Unknown channel type.
|
|
Improve this Doc
View Source
DenyAll(IChannel)
Declaration
public static OverwritePermissions DenyAll(IChannel channel)
Parameters
Returns
Exceptions
| Type |
Condition |
| System.ArgumentException |
Unknown channel type.
|
|
Improve this Doc
View Source
Modify(Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>)
Initializes a new OverwritePermissions from the current one, changing the provided
non-null permissions.
Declaration
public OverwritePermissions Modify(PermValue? createInstantInvite = default(PermValue? ), PermValue? manageChannel = default(PermValue? ), PermValue? addReactions = default(PermValue? ), PermValue? viewChannel = default(PermValue? ), PermValue? sendMessages = default(PermValue? ), PermValue? sendTTSMessages = default(PermValue? ), PermValue? manageMessages = default(PermValue? ), PermValue? embedLinks = default(PermValue? ), PermValue? attachFiles = default(PermValue? ), PermValue? readMessageHistory = default(PermValue? ), PermValue? mentionEveryone = default(PermValue? ), PermValue? useExternalEmojis = default(PermValue? ), PermValue? connect = default(PermValue? ), PermValue? speak = default(PermValue? ), PermValue? muteMembers = default(PermValue? ), PermValue? deafenMembers = default(PermValue? ), PermValue? moveMembers = default(PermValue? ), PermValue? useVoiceActivation = default(PermValue? ), PermValue? manageRoles = default(PermValue? ), PermValue? manageWebhooks = default(PermValue? ))
Parameters
Returns
|
Improve this Doc
View Source
ToAllowList()
Creates a System.Collections.Generic.List<T> of all the ChannelPermission values that are allowed.
Declaration
public List<ChannelPermission> ToAllowList()
Returns
| Type |
Description |
| System.Collections.Generic.List<ChannelPermission> |
A System.Collections.Generic.List<T> of all allowed ChannelPermission flags. If none, the list will be empty.
|
|
Improve this Doc
View Source
ToDenyList()
Creates a System.Collections.Generic.List<T> of all the ChannelPermission values that are denied.
Declaration
public List<ChannelPermission> ToDenyList()
Returns
| Type |
Description |
| System.Collections.Generic.List<ChannelPermission> |
A System.Collections.Generic.List<T> of all denied ChannelPermission flags. If none, the list will be empty.
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Overrides
System.ValueType.ToString()