Struct GuildPermissions
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public struct GuildPermissions
Constructors
| Improve this Doc View SourceGuildPermissions(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, 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 viewGuildInsights = 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 manageEmojisAndStickers = false, bool useApplicationCommands = false, bool requestToSpeak = false, bool manageEvents = false, bool manageThreads = false, bool createPublicThreads = false, bool createPrivateThreads = false, bool useExternalStickers = false, bool sendMessagesInThreads = false, bool startEmbeddedActivities = false, bool moderateMembers = false, bool useSoundboard = false, bool viewMonetizationAnalytics = false, bool sendVoiceMessages = false)
Parameters
Type | Name | Description |
---|---|---|
Boolean | createInstantInvite | |
Boolean | kickMembers | |
Boolean | banMembers | |
Boolean | administrator | |
Boolean | manageChannels | |
Boolean | manageGuild | |
Boolean | addReactions | |
Boolean | viewAuditLog | |
Boolean | viewGuildInsights | |
Boolean | viewChannel | |
Boolean | sendMessages | |
Boolean | sendTTSMessages | |
Boolean | manageMessages | |
Boolean | embedLinks | |
Boolean | attachFiles | |
Boolean | readMessageHistory | |
Boolean | mentionEveryone | |
Boolean | useExternalEmojis | |
Boolean | connect | |
Boolean | speak | |
Boolean | muteMembers | |
Boolean | deafenMembers | |
Boolean | moveMembers | |
Boolean | useVoiceActivation | |
Boolean | prioritySpeaker | |
Boolean | stream | |
Boolean | changeNickname | |
Boolean | manageNicknames | |
Boolean | manageRoles | |
Boolean | manageWebhooks | |
Boolean | manageEmojisAndStickers | |
Boolean | useApplicationCommands | |
Boolean | requestToSpeak | |
Boolean | manageEvents | |
Boolean | manageThreads | |
Boolean | createPublicThreads | |
Boolean | createPrivateThreads | |
Boolean | useExternalStickers | |
Boolean | sendMessagesInThreads | |
Boolean | startEmbeddedActivities | |
Boolean | moderateMembers | |
Boolean | useSoundboard | |
Boolean | viewMonetizationAnalytics | |
Boolean | sendVoiceMessages |
GuildPermissions(String)
Creates a new GuildPermissions with the provided packed value after converting to ulong.
Declaration
public GuildPermissions(string rawValue)
Parameters
Type | Name | Description |
---|---|---|
String | rawValue |
GuildPermissions(UInt64)
Creates a new GuildPermissions with the provided packed value.
Declaration
public GuildPermissions(ulong rawValue)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | rawValue |
Fields
| Improve this Doc View SourceAll
Gets a GuildPermissions that grants all guild permissions.
Declaration
public static readonly GuildPermissions All
Field Value
Type | Description |
---|---|
GuildPermissions |
None
Gets a blank GuildPermissions that grants no permissions.
Declaration
public static readonly GuildPermissions None
Field Value
Type | Description |
---|---|
GuildPermissions |
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 SourceAddReactions
If true, a user may add reactions.
Declaration
public readonly bool AddReactions { get; }
Property Value
Type | Description |
---|---|
Boolean |
Administrator
If true, a user is granted all permissions, and cannot have them revoked via channel permissions.
Declaration
public readonly bool Administrator { get; }
Property Value
Type | Description |
---|---|
Boolean |
AttachFiles
If true, a user may send files.
Declaration
public readonly bool AttachFiles { get; }
Property Value
Type | Description |
---|---|
Boolean |
BanMembers
If true, a user may ban users from the guild.
Declaration
public readonly bool BanMembers { get; }
Property Value
Type | Description |
---|---|
Boolean |
ChangeNickname
If true, a user may change their own nickname.
Declaration
public readonly bool ChangeNickname { get; }
Property Value
Type | Description |
---|---|
Boolean |
Connect
If true, a user may connect to a voice channel.
Declaration
public readonly bool Connect { get; }
Property Value
Type | Description |
---|---|
Boolean |
CreateInstantInvite
If true, a user may create invites.
Declaration
public readonly bool CreateInstantInvite { get; }
Property Value
Type | Description |
---|---|
Boolean |
CreatePrivateThreads
If true, a user may create private threads in this guild.
Declaration
public readonly bool CreatePrivateThreads { get; }
Property Value
Type | Description |
---|---|
Boolean |
CreatePublicThreads
If true, a user may create public threads in this guild.
Declaration
public readonly bool CreatePublicThreads { get; }
Property Value
Type | Description |
---|---|
Boolean |
DeafenMembers
If true, a user may deafen users.
Declaration
public readonly bool DeafenMembers { get; }
Property Value
Type | Description |
---|---|
Boolean |
EmbedLinks
If true, Discord will auto-embed links sent by this user.
Declaration
public readonly bool EmbedLinks { get; }
Property Value
Type | Description |
---|---|
Boolean |
KickMembers
If true, a user may kick users from the guild.
Declaration
public readonly bool KickMembers { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageChannels
If true, a user may create, delete and modify channels.
Declaration
public readonly bool ManageChannels { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageEmojisAndStickers
If true, a user may edit the emojis and stickers for this guild.
Declaration
public readonly bool ManageEmojisAndStickers { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageEvents
If true, a user may create, edit, and delete events.
Declaration
public readonly bool ManageEvents { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageGuild
If true, a user may adjust guild properties.
Declaration
public readonly bool ManageGuild { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageMessages
If true, a user may delete messages.
Declaration
public readonly bool ManageMessages { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageNicknames
If true, a user may change the nickname of other users.
Declaration
public readonly bool ManageNicknames { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageRoles
If true, a user may adjust roles.
Declaration
public readonly bool ManageRoles { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageThreads
If true, a user may manage threads in this guild.
Declaration
public readonly bool ManageThreads { get; }
Property Value
Type | Description |
---|---|
Boolean |
ManageWebhooks
If true, a user may edit the webhooks for this guild.
Declaration
public readonly bool ManageWebhooks { get; }
Property Value
Type | Description |
---|---|
Boolean |
MentionEveryone
If true, a user may mention @everyone.
Declaration
public readonly bool MentionEveryone { get; }
Property Value
Type | Description |
---|---|
Boolean |
ModerateMembers
If true, a user can timeout other users in this guild.
Declaration
public readonly bool ModerateMembers { get; }
Property Value
Type | Description |
---|---|
Boolean |
MoveMembers
If true, a user may move other users between voice channels.
Declaration
public readonly bool MoveMembers { get; }
Property Value
Type | Description |
---|---|
Boolean |
MuteMembers
If true, a user may mute users.
Declaration
public readonly bool MuteMembers { get; }
Property Value
Type | Description |
---|---|
Boolean |
PrioritySpeaker
If True, a user may use priority speaker in a voice channel.
Declaration
public readonly bool PrioritySpeaker { get; }
Property Value
Type | Description |
---|---|
Boolean |
RawValue
Gets a packed value representing all the permissions in this GuildPermissions.
Declaration
public readonly ulong RawValue { get; }
Property Value
Type | Description |
---|---|
UInt64 |
ReadMessageHistory
If true, a user may read previous messages.
Declaration
public readonly bool ReadMessageHistory { get; }
Property Value
Type | Description |
---|---|
Boolean |
RequestToSpeak
If true, a user may request to speak in stage channels.
Declaration
public readonly bool RequestToSpeak { get; }
Property Value
Type | Description |
---|---|
Boolean |
SendMessages
If True, a user may send messages.
Declaration
public readonly bool SendMessages { get; }
Property Value
Type | Description |
---|---|
Boolean |
SendMessagesInThreads
If true, a user may send messages in threads in this guild.
Declaration
public readonly bool SendMessagesInThreads { get; }
Property Value
Type | Description |
---|---|
Boolean |
SendTTSMessages
If true, a user may send text-to-speech messages.
Declaration
public readonly bool SendTTSMessages { get; }
Property Value
Type | Description |
---|---|
Boolean |
SendVoiceMessages
If true, a user can send voice messages in this channel.
Declaration
public readonly bool SendVoiceMessages { get; }
Property Value
Type | Description |
---|---|
Boolean |
Speak
If true, a user may speak in a voice channel.
Declaration
public readonly bool Speak { get; }
Property Value
Type | Description |
---|---|
Boolean |
StartEmbeddedActivities
If true, a user launch application activities in voice channels in this guild.
Declaration
public readonly bool StartEmbeddedActivities { get; }
Property Value
Type | Description |
---|---|
Boolean |
Stream
If True, a user may stream video in a voice channel.
Declaration
public readonly bool Stream { get; }
Property Value
Type | Description |
---|---|
Boolean |
UseApplicationCommands
If true, a user may use slash commands in this guild.
Declaration
public readonly bool UseApplicationCommands { get; }
Property Value
Type | Description |
---|---|
Boolean |
UseExternalEmojis
If true, a user may use custom emoji from other guilds.
Declaration
public readonly bool UseExternalEmojis { get; }
Property Value
Type | Description |
---|---|
Boolean |
UseExternalStickers
If true, a user may use external stickers in this guild.
Declaration
public readonly bool UseExternalStickers { get; }
Property Value
Type | Description |
---|---|
Boolean |
UseSoundboard
If true, a user can use soundboard in this guild.
Declaration
public readonly bool UseSoundboard { get; }
Property Value
Type | Description |
---|---|
Boolean |
UseVAD
If true, a user may use voice-activity-detection rather than push-to-talk.
Declaration
public readonly bool UseVAD { get; }
Property Value
Type | Description |
---|---|
Boolean |
ViewAuditLog
If true, a user may view the audit log.
Declaration
public readonly bool ViewAuditLog { get; }
Property Value
Type | Description |
---|---|
Boolean |
ViewChannel
If True, a user may view channels.
Declaration
public readonly bool ViewChannel { get; }
Property Value
Type | Description |
---|---|
Boolean |
ViewGuildInsights
If true, a user may view the guild insights.
Declaration
public readonly bool ViewGuildInsights { get; }
Property Value
Type | Description |
---|---|
Boolean |
ViewMonetizationAnalytics
If true, a user can view monetization analytics in this guild.
Declaration
public readonly bool ViewMonetizationAnalytics { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceHas(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 |
---|---|
Boolean | true if the permission is enabled, false otherwise. |
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>, 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 = null, bool? kickMembers = null, bool? banMembers = null, bool? administrator = null, bool? manageChannels = null, bool? manageGuild = null, bool? addReactions = null, bool? viewAuditLog = null, bool? viewGuildInsights = null, bool? viewChannel = null, bool? sendMessages = null, bool? sendTTSMessages = null, bool? manageMessages = null, bool? embedLinks = null, bool? attachFiles = null, bool? readMessageHistory = null, bool? mentionEveryone = null, bool? useExternalEmojis = null, bool? connect = null, bool? speak = null, bool? muteMembers = null, bool? deafenMembers = null, bool? moveMembers = null, bool? useVoiceActivation = null, bool? prioritySpeaker = null, bool? stream = null, bool? changeNickname = null, bool? manageNicknames = null, bool? manageRoles = null, bool? manageWebhooks = null, bool? manageEmojisAndStickers = null, bool? useApplicationCommands = null, bool? requestToSpeak = null, bool? manageEvents = null, bool? manageThreads = null, bool? createPublicThreads = null, bool? createPrivateThreads = null, bool? useExternalStickers = null, bool? sendMessagesInThreads = null, bool? startEmbeddedActivities = null, bool? moderateMembers = null, bool? useSoundboard = null, bool? viewMonetizationAnalytics = null, bool? sendVoiceMessages = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Boolean> | createInstantInvite | |
Nullable<Boolean> | kickMembers | |
Nullable<Boolean> | banMembers | |
Nullable<Boolean> | administrator | |
Nullable<Boolean> | manageChannels | |
Nullable<Boolean> | manageGuild | |
Nullable<Boolean> | addReactions | |
Nullable<Boolean> | viewAuditLog | |
Nullable<Boolean> | viewGuildInsights | |
Nullable<Boolean> | viewChannel | |
Nullable<Boolean> | sendMessages | |
Nullable<Boolean> | sendTTSMessages | |
Nullable<Boolean> | manageMessages | |
Nullable<Boolean> | embedLinks | |
Nullable<Boolean> | attachFiles | |
Nullable<Boolean> | readMessageHistory | |
Nullable<Boolean> | mentionEveryone | |
Nullable<Boolean> | useExternalEmojis | |
Nullable<Boolean> | connect | |
Nullable<Boolean> | speak | |
Nullable<Boolean> | muteMembers | |
Nullable<Boolean> | deafenMembers | |
Nullable<Boolean> | moveMembers | |
Nullable<Boolean> | useVoiceActivation | |
Nullable<Boolean> | prioritySpeaker | |
Nullable<Boolean> | stream | |
Nullable<Boolean> | changeNickname | |
Nullable<Boolean> | manageNicknames | |
Nullable<Boolean> | manageRoles | |
Nullable<Boolean> | manageWebhooks | |
Nullable<Boolean> | manageEmojisAndStickers | |
Nullable<Boolean> | useApplicationCommands | |
Nullable<Boolean> | requestToSpeak | |
Nullable<Boolean> | manageEvents | |
Nullable<Boolean> | manageThreads | |
Nullable<Boolean> | createPublicThreads | |
Nullable<Boolean> | createPrivateThreads | |
Nullable<Boolean> | useExternalStickers | |
Nullable<Boolean> | sendMessagesInThreads | |
Nullable<Boolean> | startEmbeddedActivities | |
Nullable<Boolean> | moderateMembers | |
Nullable<Boolean> | useSoundboard | |
Nullable<Boolean> | viewMonetizationAnalytics | |
Nullable<Boolean> | sendVoiceMessages |
Returns
Type | Description |
---|---|
GuildPermissions |
ToList()
Returns a
Declaration
public List<GuildPermission> ToList()
Returns
Type | Description |
---|---|
List<GuildPermission> | A |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |