Struct GuildPermissions
Assembly: Discord.Net.Core.dll​
View Source​
public struct GuildPermissions
Properties​
RawValue​
Gets a packed value representing all the permissions in this Discord.GuildPermissions.
View Source​
public readonly ulong RawValue { get; }
CreateInstantInvite​
If true
, a user may create invites.
View Source​
public readonly bool CreateInstantInvite { get; }
BanMembers​
If true
, a user may ban users from the guild.
View Source​
public readonly bool BanMembers { get; }
KickMembers​
If true
, a user may kick users from the guild.
View Source​
public readonly bool KickMembers { get; }
Administrator​
If true
, a user is granted all permissions, and cannot have them revoked via channel permissions.
View Source​
public readonly bool Administrator { get; }
ManageChannels​
If true
, a user may create, delete and modify channels.
View Source​
public readonly bool ManageChannels { get; }
ManageGuild​
If true
, a user may adjust guild properties.
View Source​
public readonly bool ManageGuild { get; }
AddReactions​
If true
, a user may add reactions.
View Source​
public readonly bool AddReactions { get; }
ViewAuditLog​
If true
, a user may view the audit log.
View Source​
public readonly bool ViewAuditLog { get; }
ViewGuildInsights​
If true
, a user may view the guild insights.
View Source​
public readonly bool ViewGuildInsights { get; }
ViewChannel​
If True, a user may view channels.
View Source​
public readonly bool ViewChannel { get; }
SendMessages​
If True, a user may send messages.
View Source​
public readonly bool SendMessages { get; }
SendTTSMessages​
If true
, a user may send text-to-speech messages.
View Source​
public readonly bool SendTTSMessages { get; }
ManageMessages​
If true
, a user may delete messages.
View Source​
public readonly bool ManageMessages { get; }
EmbedLinks​
If true
, Discord will auto-embed links sent by this user.
View Source​
public readonly bool EmbedLinks { get; }
AttachFiles​
If true
, a user may send files.
View Source​
public readonly bool AttachFiles { get; }
ReadMessageHistory​
If true
, a user may read previous messages.
View Source​
public readonly bool ReadMessageHistory { get; }
MentionEveryone​
If true
, a user may mention @everyone.
View Source​
public readonly bool MentionEveryone { get; }
UseExternalEmojis​
If true
, a user may use custom emoji from other guilds.
View Source​
public readonly bool UseExternalEmojis { get; }
Connect​
If true
, a user may connect to a voice channel.
View Source​
public readonly bool Connect { get; }
Speak​
If true
, a user may speak in a voice channel.
View Source​
public readonly bool Speak { get; }
MuteMembers​
If true
, a user may mute users.
View Source​
public readonly bool MuteMembers { get; }
DeafenMembers​
If true
, a user may deafen users.
View Source​
public readonly bool DeafenMembers { get; }
MoveMembers​
If true
, a user may move other users between voice channels.
View Source​
public readonly bool MoveMembers { get; }
UseVAD​
If true
, a user may use voice-activity-detection rather than push-to-talk.
View Source​
public readonly bool UseVAD { get; }
PrioritySpeaker​
If True, a user may use priority speaker in a voice channel.
View Source​
public readonly bool PrioritySpeaker { get; }
Stream​
If True, a user may stream video in a voice channel.
View Source​
public readonly bool Stream { get; }
ChangeNickname​
If true
, a user may change their own nickname.
View Source​
public readonly bool ChangeNickname { get; }
ManageNicknames​
If true
, a user may change the nickname of other users.
View Source​
public readonly bool ManageNicknames { get; }
ManageRoles​
If true
, a user may adjust roles.
View Source​
public readonly bool ManageRoles { get; }
ManageWebhooks​
If true
, a user may edit the webhooks for this guild.
View Source​
public readonly bool ManageWebhooks { get; }
ManageEmojisAndStickers​
If true
, a user may edit the emojis and stickers for this guild.
View Source​
public readonly bool ManageEmojisAndStickers { get; }
UseApplicationCommands​
If true
, a user may use slash commands in this guild.
View Source​
public readonly bool UseApplicationCommands { get; }
RequestToSpeak​
If true
, a user may request to speak in stage channels.
View Source​
public readonly bool RequestToSpeak { get; }
ManageEvents​
If true
, a user may create, edit, and delete events.
View Source​
public readonly bool ManageEvents { get; }
ManageThreads​
If true
, a user may manage threads in this guild.
View Source​
public readonly bool ManageThreads { get; }
CreatePublicThreads​
If true
, a user may create public threads in this guild.
View Source​
public readonly bool CreatePublicThreads { get; }
CreatePrivateThreads​
If true
, a user may create private threads in this guild.
View Source​
public readonly bool CreatePrivateThreads { get; }
UseExternalStickers​
If true
, a user may use external stickers in this guild.
View Source​
public readonly bool UseExternalStickers { get; }
SendMessagesInThreads​
If true
, a user may send messages in threads in this guild.
View Source​
public readonly bool SendMessagesInThreads { get; }
StartEmbeddedActivities​
If true
, a user launch application activities in voice channels in this guild.
View Source​
public readonly bool StartEmbeddedActivities { get; }
Fields​
None​
Gets a blank Discord.GuildPermissions that grants no permissions.
View Source​
public static readonly GuildPermissions None
Webhook​
Gets a Discord.GuildPermissions that grants all guild permissions for webhook users.
View Source​
public static readonly GuildPermissions Webhook
All​
Gets a Discord.GuildPermissions that grants all guild permissions.
View Source​
public static readonly GuildPermissions All
Methods​
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>)​
Creates a new Discord.GuildPermissions from this one, changing the provided non-null permissions.
View Source​
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)
Returns​
Parameters​
Type | Name |
---|---|
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> | viewGuildInsights |
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> | manageEmojisAndStickers |
System.Nullable<System.Boolean> | useApplicationCommands |
System.Nullable<System.Boolean> | requestToSpeak |
System.Nullable<System.Boolean> | manageEvents |
System.Nullable<System.Boolean> | manageThreads |
System.Nullable<System.Boolean> | createPublicThreads |
System.Nullable<System.Boolean> | createPrivateThreads |
System.Nullable<System.Boolean> | useExternalStickers |
System.Nullable<System.Boolean> | sendMessagesInThreads |
System.Nullable<System.Boolean> | startEmbeddedActivities |
Has(GuildPermission)​
Returns a value that indicates if a specific Discord.GuildPermission is enabled in these permissions.
View Source​
public bool Has(GuildPermission permission)
Returns​
System.Boolean
: true
if the permission is enabled, false
otherwise.
Parameters​
Type | Name | Description |
---|---|---|
Discord.GuildPermission | permission | The permission value to check for. |
ToList()​
Returns a System.Collections.Generic.List%601
containing all of the Discord.GuildPermission
flags that are enabled.
View Source​
public List<GuildPermission> ToList()
Returns​
System.Collections.Generic.List<Discord.GuildPermission>
: A System.Collections.Generic.List%601
containing Discord.GuildPermission flags. Empty if none are enabled.### ToString()
View Source​
public override string ToString()
Returns​
System.String