Skip to main content

Struct OverwritePermissions

Represents a container for a series of overwrite permissions.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public struct OverwritePermissions

Properties​

InheritAll​

Gets a blank Discord.OverwritePermissions that inherits all permissions.

View Source​
Declaration
public static readonly OverwritePermissions InheritAll { get; }

AllowValue​

Gets a packed value representing all the allowed permissions in this Discord.OverwritePermissions.

View Source​
Declaration
public readonly ulong AllowValue { get; }

DenyValue​

Gets a packed value representing all the denied permissions in this Discord.OverwritePermissions.

View Source​
Declaration
public readonly ulong DenyValue { get; }

CreateInstantInvite​

If Allowed, a user may create invites.

View Source​
Declaration
public readonly PermValue CreateInstantInvite { get; }

ManageChannel​

If Allowed, a user may create, delete and modify this channel.

View Source​
Declaration
public readonly PermValue ManageChannel { get; }

AddReactions​

If Allowed, a user may add reactions.

View Source​
Declaration
public readonly PermValue AddReactions { get; }

ViewChannel​

If Allowed, a user may join channels.

View Source​
Declaration
public readonly PermValue ViewChannel { get; }

SendMessages​

If Allowed, a user may send messages.

View Source​
Declaration
public readonly PermValue SendMessages { get; }

SendTTSMessages​

If Allowed, a user may send text-to-speech messages.

View Source​
Declaration
public readonly PermValue SendTTSMessages { get; }

ManageMessages​

If Allowed, a user may delete messages.

View Source​
Declaration
public readonly PermValue ManageMessages { get; }

If Allowed, Discord will auto-embed links sent by this user.

View Source​
Declaration
public readonly PermValue EmbedLinks { get; }

AttachFiles​

If Allowed, a user may send files.

View Source​
Declaration
public readonly PermValue AttachFiles { get; }

ReadMessageHistory​

If Allowed, a user may read previous messages.

View Source​
Declaration
public readonly PermValue ReadMessageHistory { get; }

MentionEveryone​

If Allowed, a user may mention @everyone.

View Source​
Declaration
public readonly PermValue MentionEveryone { get; }

UseExternalEmojis​

If Allowed, a user may use custom emoji from other guilds.

View Source​
Declaration
public readonly PermValue UseExternalEmojis { get; }

Connect​

If Allowed, a user may connect to a voice channel.

View Source​
Declaration
public readonly PermValue Connect { get; }

Speak​

If Allowed, a user may speak in a voice channel.

View Source​
Declaration
public readonly PermValue Speak { get; }

MuteMembers​

If Allowed, a user may mute users.

View Source​
Declaration
public readonly PermValue MuteMembers { get; }

DeafenMembers​

If Allowed, a user may deafen users.

View Source​
Declaration
public readonly PermValue DeafenMembers { get; }

MoveMembers​

If Allowed, a user may move other users between voice channels.

View Source​
Declaration
public readonly PermValue MoveMembers { get; }

UseVAD​

If Allowed, a user may use voice-activity-detection rather than push-to-talk.

View Source​
Declaration
public readonly PermValue UseVAD { get; }

PrioritySpeaker​

If Allowed, a user may use priority speaker in a voice channel.

View Source​
Declaration
public readonly PermValue PrioritySpeaker { get; }

Stream​

If Allowed, a user may go live in a voice channel.

View Source​
Declaration
public readonly PermValue Stream { get; }

ManageRoles​

If Allowed, a user may adjust role permissions. This also implicitly grants all other permissions.

View Source​
Declaration
public readonly PermValue ManageRoles { get; }

ManageWebhooks​

If True, a user may edit the webhooks for this channel.

View Source​
Declaration
public readonly PermValue ManageWebhooks { get; }

UseApplicationCommands​

If true, a user may use slash commands in this guild.

View Source​
Declaration
public readonly PermValue UseApplicationCommands { get; }

RequestToSpeak​

If true, a user may request to speak in stage channels.

View Source​
Declaration
public readonly PermValue RequestToSpeak { get; }

ManageThreads​

If true, a user may manage threads in this guild.

View Source​
Declaration
public readonly PermValue ManageThreads { get; }

CreatePublicThreads​

If true, a user may create public threads in this guild.

View Source​
Declaration
public readonly PermValue CreatePublicThreads { get; }

CreatePrivateThreads​

If true, a user may create private threads in this guild.

View Source​
Declaration
public readonly PermValue CreatePrivateThreads { get; }

UseExternalStickers​

If true, a user may use external stickers in this guild.

View Source​
Declaration
public readonly PermValue UseExternalStickers { get; }

SendMessagesInThreads​

If true, a user may send messages in threads in this guild.

View Source​
Declaration
public readonly PermValue SendMessagesInThreads { get; }

StartEmbeddedActivities​

If true, a user launch application activities in voice channels in this guild.

View Source​
Declaration
public readonly PermValue StartEmbeddedActivities { get; }

Methods​

AllowAll(IChannel)​

Gets a Discord.OverwritePermissions that grants all permissions for the given channel.

View Source​
Declaration
public static OverwritePermissions AllowAll(IChannel channel)
Returns​

Discord.OverwritePermissions

Parameters​
TypeName
Discord.IChannelchannel

DenyAll(IChannel)​

Gets a Discord.OverwritePermissions that denies all permissions for the given channel.

View Source​
Declaration
public static OverwritePermissions DenyAll(IChannel channel)
Returns​

Discord.OverwritePermissions

Parameters​
TypeName
Discord.IChannelchannel

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>, 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 Discord.OverwritePermissions from the current one, changing the provided non-null permissions.

View Source​
Declaration
public OverwritePermissions Modify(PermValue? createInstantInvite = null, PermValue? manageChannel = null, PermValue? addReactions = null, PermValue? viewChannel = null, PermValue? sendMessages = null, PermValue? sendTTSMessages = null, PermValue? manageMessages = null, PermValue? embedLinks = null, PermValue? attachFiles = null, PermValue? readMessageHistory = null, PermValue? mentionEveryone = null, PermValue? useExternalEmojis = null, PermValue? connect = null, PermValue? speak = null, PermValue? muteMembers = null, PermValue? deafenMembers = null, PermValue? moveMembers = null, PermValue? useVoiceActivation = null, PermValue? manageRoles = null, PermValue? manageWebhooks = null, PermValue? prioritySpeaker = null, PermValue? stream = null, PermValue? useSlashCommands = null, PermValue? useApplicationCommands = null, PermValue? requestToSpeak = null, PermValue? manageThreads = null, PermValue? createPublicThreads = null, PermValue? createPrivateThreads = null, PermValue? usePublicThreads = null, PermValue? usePrivateThreads = null, PermValue? useExternalStickers = null, PermValue? sendMessagesInThreads = null, PermValue? startEmbeddedActivities = null)
Returns​

Discord.OverwritePermissions

Parameters​
TypeName
System.Nullable<Discord.PermValue>createInstantInvite
System.Nullable<Discord.PermValue>manageChannel
System.Nullable<Discord.PermValue>addReactions
System.Nullable<Discord.PermValue>viewChannel
System.Nullable<Discord.PermValue>sendMessages
System.Nullable<Discord.PermValue>sendTTSMessages
System.Nullable<Discord.PermValue>manageMessages
System.Nullable<Discord.PermValue>embedLinks
System.Nullable<Discord.PermValue>attachFiles
System.Nullable<Discord.PermValue>readMessageHistory
System.Nullable<Discord.PermValue>mentionEveryone
System.Nullable<Discord.PermValue>useExternalEmojis
System.Nullable<Discord.PermValue>connect
System.Nullable<Discord.PermValue>speak
System.Nullable<Discord.PermValue>muteMembers
System.Nullable<Discord.PermValue>deafenMembers
System.Nullable<Discord.PermValue>moveMembers
System.Nullable<Discord.PermValue>useVoiceActivation
System.Nullable<Discord.PermValue>manageRoles
System.Nullable<Discord.PermValue>manageWebhooks
System.Nullable<Discord.PermValue>prioritySpeaker
System.Nullable<Discord.PermValue>stream
System.Nullable<Discord.PermValue>useSlashCommands
System.Nullable<Discord.PermValue>useApplicationCommands
System.Nullable<Discord.PermValue>requestToSpeak
System.Nullable<Discord.PermValue>manageThreads
System.Nullable<Discord.PermValue>createPublicThreads
System.Nullable<Discord.PermValue>createPrivateThreads
System.Nullable<Discord.PermValue>usePublicThreads
System.Nullable<Discord.PermValue>usePrivateThreads
System.Nullable<Discord.PermValue>useExternalStickers
System.Nullable<Discord.PermValue>sendMessagesInThreads
System.Nullable<Discord.PermValue>startEmbeddedActivities

ToAllowList()​

Creates a System.Collections.Generic.List%601 of all the Discord.ChannelPermission values that are allowed.

View Source​
Declaration
public List<ChannelPermission> ToAllowList()
Returns​

System.Collections.Generic.List<Discord.ChannelPermission>: A System.Collections.Generic.List%601 of all allowed Discord.ChannelPermission flags. If none, the list will be empty.### ToDenyList() Creates a System.Collections.Generic.List%601 of all the Discord.ChannelPermission values that are denied.

View Source​
Declaration
public List<ChannelPermission> ToDenyList()
Returns​

System.Collections.Generic.List<Discord.ChannelPermission>: A System.Collections.Generic.List%601 of all denied Discord.ChannelPermission flags. If none, the list will be empty.### ToString()

View Source​
Declaration
public override string ToString()
Returns​

System.String