Struct GuildPermissions
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
public struct GuildPermissions
- Inherited Members
Constructors
GuildPermissions(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)
Creates a new GuildPermissions structure with the provided permissions.
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, bool useClydeAI = false, bool createGuildExpressions = false, bool setVoiceChannelStatus = false, bool sendPolls = false, bool useExternalApps = false, bool useExternalSounds = false, bool createEvents = false)
Parameters
createInstantInvite
boolkickMembers
boolbanMembers
booladministrator
boolmanageChannels
boolmanageGuild
booladdReactions
boolviewAuditLog
boolviewGuildInsights
boolviewChannel
boolsendMessages
boolsendTTSMessages
boolmanageMessages
boolembedLinks
boolattachFiles
boolreadMessageHistory
boolmentionEveryone
booluseExternalEmojis
boolconnect
boolspeak
boolmuteMembers
booldeafenMembers
boolmoveMembers
booluseVoiceActivation
boolprioritySpeaker
boolstream
boolchangeNickname
boolmanageNicknames
boolmanageRoles
boolmanageWebhooks
boolmanageEmojisAndStickers
booluseApplicationCommands
boolrequestToSpeak
boolmanageEvents
boolmanageThreads
boolcreatePublicThreads
boolcreatePrivateThreads
booluseExternalStickers
boolsendMessagesInThreads
boolstartEmbeddedActivities
boolmoderateMembers
booluseSoundboard
boolviewMonetizationAnalytics
boolsendVoiceMessages
booluseClydeAI
boolcreateGuildExpressions
boolsetVoiceChannelStatus
boolsendPolls
booluseExternalApps
booluseExternalSounds
boolcreateEvents
bool
GuildPermissions(string)
Creates a new GuildPermissions with the provided packed value after converting to ulong.
public GuildPermissions(string rawValue)
Parameters
rawValue
string
GuildPermissions(ulong)
Creates a new GuildPermissions with the provided packed value.
public GuildPermissions(ulong rawValue)
Parameters
rawValue
ulong
Fields
All
Gets a GuildPermissions that grants all guild permissions.
public static readonly GuildPermissions All
Field Value
None
Gets a blank GuildPermissions that grants no permissions.
public static readonly GuildPermissions None
Field Value
Webhook
Gets a GuildPermissions that grants all guild permissions for webhook users.
public static readonly GuildPermissions Webhook
Field Value
Properties
AddReactions
If true, a user may add reactions.
public bool AddReactions { get; }
Property Value
Administrator
If true, a user is granted all permissions, and cannot have them revoked via channel permissions.
public bool Administrator { get; }
Property Value
AttachFiles
If true, a user may send files.
public bool AttachFiles { get; }
Property Value
BanMembers
If true, a user may ban users from the guild.
public bool BanMembers { get; }
Property Value
ChangeNickname
If true, a user may change their own nickname.
public bool ChangeNickname { get; }
Property Value
Connect
If true, a user may connect to a voice channel.
public bool Connect { get; }
Property Value
CreateEvents
If true, a user can create events.
public bool CreateEvents { get; }
Property Value
CreateGuildExpressions
If true, a user can create guild expressions in this guild.
public bool CreateGuildExpressions { get; }
Property Value
CreateInstantInvite
If true, a user may create invites.
public bool CreateInstantInvite { get; }
Property Value
CreatePrivateThreads
If true, a user may create private threads in this guild.
public bool CreatePrivateThreads { get; }
Property Value
CreatePublicThreads
If true, a user may create public threads in this guild.
public bool CreatePublicThreads { get; }
Property Value
DeafenMembers
If true, a user may deafen users.
public bool DeafenMembers { get; }
Property Value
EmbedLinks
If true, Discord will auto-embed links sent by this user.
public bool EmbedLinks { get; }
Property Value
KickMembers
If true, a user may kick users from the guild.
public bool KickMembers { get; }
Property Value
ManageChannels
If true, a user may create, delete and modify channels.
public bool ManageChannels { get; }
Property Value
ManageEmojisAndStickers
If true, a user may edit the emojis and stickers for this guild.
public bool ManageEmojisAndStickers { get; }
Property Value
ManageEvents
If true, a user may create, edit, and delete events.
public bool ManageEvents { get; }
Property Value
ManageGuild
If true, a user may adjust guild properties.
public bool ManageGuild { get; }
Property Value
ManageMessages
If true, a user may delete messages.
public bool ManageMessages { get; }
Property Value
ManageNicknames
If true, a user may change the nickname of other users.
public bool ManageNicknames { get; }
Property Value
ManageRoles
If true, a user may adjust roles.
public bool ManageRoles { get; }
Property Value
ManageThreads
If true, a user may manage threads in this guild.
public bool ManageThreads { get; }
Property Value
ManageWebhooks
If true, a user may edit the webhooks for this guild.
public bool ManageWebhooks { get; }
Property Value
MentionEveryone
If true, a user may mention @everyone.
public bool MentionEveryone { get; }
Property Value
ModerateMembers
If true, a user can timeout other users in this guild.
public bool ModerateMembers { get; }
Property Value
MoveMembers
If true, a user may move other users between voice channels.
public bool MoveMembers { get; }
Property Value
MuteMembers
If true, a user may mute users.
public bool MuteMembers { get; }
Property Value
PrioritySpeaker
If True, a user may use priority speaker in a voice channel.
public bool PrioritySpeaker { get; }
Property Value
RawValue
Gets a packed value representing all the permissions in this GuildPermissions.
public readonly ulong RawValue { get; }
Property Value
ReadMessageHistory
If true, a user may read previous messages.
public bool ReadMessageHistory { get; }
Property Value
RequestToSpeak
If true, a user may request to speak in stage channels.
public bool RequestToSpeak { get; }
Property Value
SendMessages
If True, a user may send messages.
public bool SendMessages { get; }
Property Value
SendMessagesInThreads
If true, a user may send messages in threads in this guild.
public bool SendMessagesInThreads { get; }
Property Value
SendPolls
If true, a user can send polls.
public bool SendPolls { get; }
Property Value
SendTTSMessages
If true, a user may send text-to-speech messages.
public bool SendTTSMessages { get; }
Property Value
SendVoiceMessages
If true, a user can send voice messages in this guild.
public bool SendVoiceMessages { get; }
Property Value
SetVoiceChannelStatus
If true, a user can set the status of a voice channel.
public bool SetVoiceChannelStatus { get; }
Property Value
Speak
If true, a user may speak in a voice channel.
public bool Speak { get; }
Property Value
StartEmbeddedActivities
If true, a user launch application activities in voice channels in this guild.
public bool StartEmbeddedActivities { get; }
Property Value
Stream
If True, a user may stream video in a voice channel.
public bool Stream { get; }
Property Value
UseApplicationCommands
If true, a user may use slash commands in this guild.
public bool UseApplicationCommands { get; }
Property Value
UseClydeAI
If true, a user can use the Clyde AI bot in this guild.
public bool UseClydeAI { get; }
Property Value
UseExternalEmojis
If true, a user may use custom emoji from other guilds.
public bool UseExternalEmojis { get; }
Property Value
UseExternalStickers
If true, a user may use external stickers in this guild.
public bool UseExternalStickers { get; }
Property Value
UseSoundboard
If true, a user can use soundboard in this guild.
public bool UseSoundboard { get; }
Property Value
UseVAD
If true, a user may use voice-activity-detection rather than push-to-talk.
public bool UseVAD { get; }
Property Value
UserExternalApps
If true, a user-installed application can send public responses.
public bool UserExternalApps { get; }
Property Value
UserExternalSounds
If true, a user can send soundboard sounds from other servers.
public bool UserExternalSounds { get; }
Property Value
ViewAuditLog
If true, a user may view the audit log.
public bool ViewAuditLog { get; }
Property Value
ViewChannel
If True, a user may view channels.
public bool ViewChannel { get; }
Property Value
ViewGuildInsights
If true, a user may view the guild insights.
public bool ViewGuildInsights { get; }
Property Value
ViewMonetizationAnalytics
If true, a user can view monetization analytics in this guild.
public bool ViewMonetizationAnalytics { get; }
Property Value
Methods
Has(GuildPermission)
Returns a value that indicates if a specific GuildPermission is enabled in these permissions.
public bool Has(GuildPermission permission)
Parameters
permission
GuildPermissionThe permission value to check for.
Returns
Modify(bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?)
Creates a new GuildPermissions from this one, changing the provided non-null permissions.
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, bool? useClydeAI = null, bool? createGuildExpressions = null, bool? setVoiceChannelStatus = null, bool? sendPolls = null, bool? useExternalApps = null, bool? useExternalSounds = null, bool? createEvents = null)
Parameters
createInstantInvite
bool?kickMembers
bool?banMembers
bool?administrator
bool?manageChannels
bool?manageGuild
bool?addReactions
bool?viewAuditLog
bool?viewGuildInsights
bool?viewChannel
bool?sendMessages
bool?sendTTSMessages
bool?manageMessages
bool?embedLinks
bool?attachFiles
bool?readMessageHistory
bool?mentionEveryone
bool?useExternalEmojis
bool?connect
bool?speak
bool?muteMembers
bool?deafenMembers
bool?moveMembers
bool?useVoiceActivation
bool?prioritySpeaker
bool?stream
bool?changeNickname
bool?manageNicknames
bool?manageRoles
bool?manageWebhooks
bool?manageEmojisAndStickers
bool?useApplicationCommands
bool?requestToSpeak
bool?manageEvents
bool?manageThreads
bool?createPublicThreads
bool?createPrivateThreads
bool?useExternalStickers
bool?sendMessagesInThreads
bool?startEmbeddedActivities
bool?moderateMembers
bool?useSoundboard
bool?viewMonetizationAnalytics
bool?sendVoiceMessages
bool?useClydeAI
bool?createGuildExpressions
bool?setVoiceChannelStatus
bool?sendPolls
bool?useExternalApps
bool?useExternalSounds
bool?createEvents
bool?
Returns
ToList()
Returns a List<T> containing all of the GuildPermission flags that are enabled.
public List<GuildPermission> ToList()
Returns
- List<GuildPermission>
A List<T> containing GuildPermission flags. Empty if none are enabled.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.