Show / Hide Table of Contents

# Struct GuildPermissions

##### 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 GuildPermissions

### Constructors

| Improve this Doc View Source

#### GuildPermissions(Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)

Creates a new GuildPermissions structure with the provided permissions.

##### Declaration

    public GuildPermissions(bool createInstantInvite = false, bool kickMembers = false, bool banMembers = false, bool administrator = false, bool manageChannels = false, bool manageGuild = false, bool addReactions = false, bool viewAuditLog = false, bool viewChannel = false, bool sendMessages = false, bool sendTTSMessages = false, bool manageMessages = false, bool embedLinks = false, bool attachFiles = false, bool readMessageHistory = false, bool mentionEveryone = false, bool useExternalEmojis = false, bool connect = false, bool speak = false, bool muteMembers = false, bool deafenMembers = false, bool moveMembers = false, bool useVoiceActivation = false, bool prioritySpeaker = false, bool stream = false, bool changeNickname = false, bool manageNicknames = false, bool manageRoles = false, bool manageWebhooks = false, bool manageEmojis = false)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | createInstantInvite |
System.Boolean | kickMembers |
System.Boolean | banMembers |
System.Boolean | administrator |
System.Boolean | manageChannels |
System.Boolean | manageGuild |
System.Boolean | addReactions |
System.Boolean | viewAuditLog |
System.Boolean | viewChannel |
System.Boolean | sendMessages |
System.Boolean | sendTTSMessages |
System.Boolean | manageMessages |
System.Boolean | embedLinks |
System.Boolean | attachFiles |
System.Boolean | readMessageHistory |
System.Boolean | mentionEveryone |
System.Boolean | useExternalEmojis |
System.Boolean | connect |
System.Boolean | speak |
System.Boolean | muteMembers |
System.Boolean | deafenMembers |
System.Boolean | moveMembers |
System.Boolean | useVoiceActivation |
System.Boolean | prioritySpeaker |
System.Boolean | stream |
System.Boolean | changeNickname |
System.Boolean | manageNicknames |
System.Boolean | manageRoles |
System.Boolean | manageWebhooks |
System.Boolean | manageEmojis |

| Improve this Doc View Source

#### GuildPermissions(UInt64)

Creates a new GuildPermissions with the provided packed value.

##### Declaration

    public GuildPermissions(ulong rawValue)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | rawValue |

### Fields

| Improve this Doc View Source

#### All

Gets a GuildPermissions that grants all guild permissions.

##### Declaration

    public static readonly GuildPermissions All

##### Field Value

Type | Description
--- | ---
GuildPermissions |

| Improve this Doc View Source

#### None

Gets a blank GuildPermissions that grants no permissions.

##### Declaration

    public static readonly GuildPermissions None

##### Field Value

Type | Description
--- | ---
GuildPermissions |

| Improve this Doc View Source

#### Webhook

Gets a GuildPermissions that grants all guild permissions for webhook users.

##### Declaration

    public static readonly GuildPermissions Webhook

##### Field Value

Type | Description
--- | ---
GuildPermissions |

### Properties

| Improve this Doc View Source

#### AddReactions

If `true`, a user may add reactions.

##### Declaration

    public bool AddReactions { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Administrator

If `true`, a user is granted all permissions, and cannot have them revoked via channel permissions.

##### Declaration

    public bool Administrator { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### AttachFiles

If `true`, a user may send files.

##### Declaration

    public bool AttachFiles { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### BanMembers

If `true`, a user may ban users from the guild.

##### Declaration

    public bool BanMembers { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ChangeNickname

If `true`, a user may change their own nickname.

##### Declaration

    public bool ChangeNickname { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Connect

If `true`, a user may connect to a voice channel.

##### Declaration

    public bool Connect { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### CreateInstantInvite

If `true`, a user may create invites.

##### Declaration

    public bool CreateInstantInvite { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### DeafenMembers

If `true`, a user may deafen users.

##### Declaration

    public bool DeafenMembers { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### EmbedLinks

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

##### Declaration

    public bool EmbedLinks { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### KickMembers

If `true`, a user may kick users from the guild.

##### Declaration

    public bool KickMembers { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageChannels

If `true`, a user may create, delete and modify channels.

##### Declaration

    public bool ManageChannels { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageEmojis

If `true`, a user may edit the emojis for this guild.

##### Declaration

    public bool ManageEmojis { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageGuild

If `true`, a user may adjust guild properties.

##### Declaration

    public bool ManageGuild { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageMessages

If `true`, a user may delete messages.

##### Declaration

    public bool ManageMessages { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageNicknames

If `true`, a user may change the nickname of other users.

##### Declaration

    public bool ManageNicknames { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageRoles

If `true`, a user may adjust roles.

##### Declaration

    public bool ManageRoles { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ManageWebhooks

If `true`, a user may edit the webhooks for this guild.

##### Declaration

    public bool ManageWebhooks { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### MentionEveryone

If `true`, a user may mention @everyone.

##### Declaration

    public bool MentionEveryone { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### MoveMembers

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

##### Declaration

    public bool MoveMembers { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### MuteMembers

If `true`, a user may mute users.

##### Declaration

    public bool MuteMembers { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### PrioritySpeaker

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

##### Declaration

    public bool PrioritySpeaker { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### RawValue

Gets a packed value representing all the permissions in this GuildPermissions.

##### Declaration

    public ulong RawValue { get; }

##### Property Value

Type | Description
--- | ---
System.UInt64 |

| Improve this Doc View Source

#### ReadMessageHistory

If `true`, a user may read previous messages.

##### Declaration

    public bool ReadMessageHistory { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ReadMessages

If True, a user may join channels.

##### Declaration

    [Obsolete("Use ViewChannel instead.")]
    public bool ReadMessages { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### SendMessages

If True, a user may send messages.

##### Declaration

    public bool SendMessages { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### SendTTSMessages

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

##### Declaration

    public bool SendTTSMessages { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Speak

If `true`, a user may speak in a voice channel.

##### Declaration

    public bool Speak { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Stream

If True, a user may stream video in a voice channel.

##### Declaration

    public bool Stream { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### UseExternalEmojis

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

##### Declaration

    public bool UseExternalEmojis { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### UseVAD

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

##### Declaration

    public bool UseVAD { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ViewAuditLog

If `true`, a user may view the audit log.

##### Declaration

    public bool ViewAuditLog { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ViewChannel

If True, a user may view channels.

##### Declaration

    public bool ViewChannel { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

### Methods

| Improve this Doc View Source

#### Has(GuildPermission)

Returns a value that indicates if a specific GuildPermission is enabled in these permissions.

##### Declaration

    public bool Has(GuildPermission permission)

##### Parameters

Type | Name | Description
--- | --- | ---
GuildPermission | permission | The permission value to check for.

##### Returns

Type | Description
--- | ---
System.Boolean | `true` if the permission is enabled, `false` otherwise.

| Improve this Doc View Source

#### Modify(Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Creates a new GuildPermissions from this one, changing the provided non-null permissions.

##### Declaration

    public GuildPermissions Modify(bool? createInstantInvite = default(bool? ), bool? kickMembers = default(bool? ), bool? banMembers = default(bool? ), bool? administrator = default(bool? ), bool? manageChannels = default(bool? ), bool? manageGuild = default(bool? ), bool? addReactions = default(bool? ), bool? viewAuditLog = default(bool? ), bool? viewChannel = default(bool? ), bool? sendMessages = default(bool? ), bool? sendTTSMessages = default(bool? ), bool? manageMessages = default(bool? ), bool? embedLinks = default(bool? ), bool? attachFiles = default(bool? ), bool? readMessageHistory = default(bool? ), bool? mentionEveryone = default(bool? ), bool? useExternalEmojis = default(bool? ), bool? connect = default(bool? ), bool? speak = default(bool? ), bool? muteMembers = default(bool? ), bool? deafenMembers = default(bool? ), bool? moveMembers = default(bool? ), bool? useVoiceActivation = default(bool? ), bool? prioritySpeaker = default(bool? ), bool? stream = default(bool? ), bool? changeNickname = default(bool? ), bool? manageNicknames = default(bool? ), bool? manageRoles = default(bool? ), bool? manageWebhooks = default(bool? ), bool? manageEmojis = default(bool? ))

##### Parameters

Type | Name | Description
--- | --- | ---
System.Nullable<System.Boolean> | createInstantInvite |
System.Nullable<System.Boolean> | kickMembers |
System.Nullable<System.Boolean> | banMembers |
System.Nullable<System.Boolean> | administrator |
System.Nullable<System.Boolean> | manageChannels |
System.Nullable<System.Boolean> | manageGuild |
System.Nullable<System.Boolean> | addReactions |
System.Nullable<System.Boolean> | viewAuditLog |
System.Nullable<System.Boolean> | viewChannel |
System.Nullable<System.Boolean> | sendMessages |
System.Nullable<System.Boolean> | sendTTSMessages |
System.Nullable<System.Boolean> | manageMessages |
System.Nullable<System.Boolean> | embedLinks |
System.Nullable<System.Boolean> | attachFiles |
System.Nullable<System.Boolean> | readMessageHistory |
System.Nullable<System.Boolean> | mentionEveryone |
System.Nullable<System.Boolean> | useExternalEmojis |
System.Nullable<System.Boolean> | connect |
System.Nullable<System.Boolean> | speak |
System.Nullable<System.Boolean> | muteMembers |
System.Nullable<System.Boolean> | deafenMembers |
System.Nullable<System.Boolean> | moveMembers |
System.Nullable<System.Boolean> | useVoiceActivation |
System.Nullable<System.Boolean> | prioritySpeaker |
System.Nullable<System.Boolean> | stream |
System.Nullable<System.Boolean> | changeNickname |
System.Nullable<System.Boolean> | manageNicknames |
System.Nullable<System.Boolean> | manageRoles |
System.Nullable<System.Boolean> | manageWebhooks |
System.Nullable<System.Boolean> | manageEmojis |

##### Returns

Type | Description
--- | ---
GuildPermissions |

| Improve this Doc View Source

#### ToList()

Returns a System.Collections.Generic.List<T> containing all of the GuildPermission flags that are enabled.

##### Declaration

    public List<GuildPermission> ToList()

##### Returns

Type | Description
--- | ---
System.Collections.Generic.List<GuildPermission> | A System.Collections.Generic.List<T> containing GuildPermission flags. Empty if none are enabled.

| Improve this Doc View Source

#### ToString()

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String |

##### Overrides

System.ValueType.ToString()