Show / Hide Table of Contents

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()
Namespace: Discord
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)

Initializes a new ChannelPermissions struct with the provided permissions.

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
Type Name Description
PermValue createInstantInvite
PermValue manageChannel
PermValue addReactions
PermValue viewChannel
PermValue sendMessages
PermValue sendTTSMessages
PermValue manageMessages
PermValue embedLinks
PermValue attachFiles
PermValue readMessageHistory
PermValue mentionEveryone
PermValue useExternalEmojis
PermValue connect
PermValue speak
PermValue muteMembers
PermValue deafenMembers
PermValue moveMembers
PermValue useVoiceActivation
PermValue manageRoles
PermValue manageWebhooks
| 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
Type Description
PermValue
| Improve this Doc View Source

AllowValue

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

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
Type Description
PermValue
| Improve this Doc View Source

Connect

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

Declaration
public PermValue Connect { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

CreateInstantInvite

If Allowed, a user may create invites.

Declaration
public PermValue CreateInstantInvite { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

DeafenMembers

If Allowed, a user may deafen users.

Declaration
public PermValue DeafenMembers { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

DenyValue

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

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
Type Description
PermValue
| Improve this Doc View Source

InheritAll

Gets a blank OverwritePermissions that inherits all permissions.

Declaration
public static OverwritePermissions InheritAll { get; }
Property Value
Type Description
OverwritePermissions
| Improve this Doc View Source

ManageChannel

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

Declaration
public PermValue ManageChannel { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

ManageMessages

If Allowed, a user may delete messages.

Declaration
public PermValue ManageMessages { get; }
Property Value
Type Description
PermValue
| 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
Type Description
PermValue
| Improve this Doc View Source

ManageWebhooks

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

Declaration
public PermValue ManageWebhooks { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

MentionEveryone

If Allowed, a user may mention @everyone.

Declaration
public PermValue MentionEveryone { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

MoveMembers

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

Declaration
public PermValue MoveMembers { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

MuteMembers

If Allowed, a user may mute users.

Declaration
public PermValue MuteMembers { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

ReadMessageHistory

If Allowed, a user may read previous messages.

Declaration
public PermValue ReadMessageHistory { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

ReadMessages

If Allowed, a user may join channels.

Declaration
[Obsolete("Use ViewChannel instead.")]
public PermValue ReadMessages { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

SendMessages

If Allowed, a user may send messages.

Declaration
public PermValue SendMessages { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

SendTTSMessages

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

Declaration
public PermValue SendTTSMessages { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

Speak

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

Declaration
public PermValue Speak { get; }
Property Value
Type Description
PermValue
| Improve this Doc View Source

UseExternalEmojis

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

Declaration
public PermValue UseExternalEmojis { get; }
Property Value
Type Description
PermValue
| 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
Type Description
PermValue
| Improve this Doc View Source

ViewChannel

If Allowed, a user may join channels.

Declaration
public PermValue ViewChannel { get; }
Property Value
Type Description
PermValue

Methods

| Improve this Doc View Source

AllowAll(IChannel)

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

Declaration
public static OverwritePermissions AllowAll(IChannel channel)
Parameters
Type Name Description
IChannel channel
Returns
Type Description
OverwritePermissions
Exceptions
Type Condition
System.ArgumentException

Unknown channel type.

| Improve this Doc View Source

DenyAll(IChannel)

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

Declaration
public static OverwritePermissions DenyAll(IChannel channel)
Parameters
Type Name Description
IChannel channel
Returns
Type Description
OverwritePermissions
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
Type Name Description
System.Nullable<PermValue> createInstantInvite
System.Nullable<PermValue> manageChannel
System.Nullable<PermValue> addReactions
System.Nullable<PermValue> viewChannel
System.Nullable<PermValue> sendMessages
System.Nullable<PermValue> sendTTSMessages
System.Nullable<PermValue> manageMessages
System.Nullable<PermValue> embedLinks
System.Nullable<PermValue> attachFiles
System.Nullable<PermValue> readMessageHistory
System.Nullable<PermValue> mentionEveryone
System.Nullable<PermValue> useExternalEmojis
System.Nullable<PermValue> connect
System.Nullable<PermValue> speak
System.Nullable<PermValue> muteMembers
System.Nullable<PermValue> deafenMembers
System.Nullable<PermValue> moveMembers
System.Nullable<PermValue> useVoiceActivation
System.Nullable<PermValue> manageRoles
System.Nullable<PermValue> manageWebhooks
Returns
Type Description
OverwritePermissions
| 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()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX