Table of Contents

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

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

GuildPermissions

None

Gets a blank GuildPermissions that grants no permissions.

public static readonly GuildPermissions None

Field Value

GuildPermissions

Webhook

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

public static readonly GuildPermissions Webhook

Field Value

GuildPermissions

Properties

AddReactions

If true, a user may add reactions.

public bool AddReactions { get; }

Property Value

bool

Administrator

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

public bool Administrator { get; }

Property Value

bool

AttachFiles

If true, a user may send files.

public bool AttachFiles { get; }

Property Value

bool

BanMembers

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

public bool BanMembers { get; }

Property Value

bool

ChangeNickname

If true, a user may change their own nickname.

public bool ChangeNickname { get; }

Property Value

bool

Connect

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

public bool Connect { get; }

Property Value

bool

CreateEvents

If true, a user can create events.

public bool CreateEvents { get; }

Property Value

bool

CreateGuildExpressions

If true, a user can create guild expressions in this guild.

public bool CreateGuildExpressions { get; }

Property Value

bool

CreateInstantInvite

If true, a user may create invites.

public bool CreateInstantInvite { get; }

Property Value

bool

CreatePrivateThreads

If true, a user may create private threads in this guild.

public bool CreatePrivateThreads { get; }

Property Value

bool

CreatePublicThreads

If true, a user may create public threads in this guild.

public bool CreatePublicThreads { get; }

Property Value

bool

DeafenMembers

If true, a user may deafen users.

public bool DeafenMembers { get; }

Property Value

bool

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

public bool EmbedLinks { get; }

Property Value

bool

KickMembers

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

public bool KickMembers { get; }

Property Value

bool

ManageChannels

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

public bool ManageChannels { get; }

Property Value

bool

ManageEmojisAndStickers

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

public bool ManageEmojisAndStickers { get; }

Property Value

bool

ManageEvents

If true, a user may create, edit, and delete events.

public bool ManageEvents { get; }

Property Value

bool

ManageGuild

If true, a user may adjust guild properties.

public bool ManageGuild { get; }

Property Value

bool

ManageMessages

If true, a user may delete messages.

public bool ManageMessages { get; }

Property Value

bool

ManageNicknames

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

public bool ManageNicknames { get; }

Property Value

bool

ManageRoles

If true, a user may adjust roles.

public bool ManageRoles { get; }

Property Value

bool

ManageThreads

If true, a user may manage threads in this guild.

public bool ManageThreads { get; }

Property Value

bool

ManageWebhooks

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

public bool ManageWebhooks { get; }

Property Value

bool

MentionEveryone

If true, a user may mention @everyone.

public bool MentionEveryone { get; }

Property Value

bool

ModerateMembers

If true, a user can timeout other users in this guild.

public bool ModerateMembers { get; }

Property Value

bool

MoveMembers

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

public bool MoveMembers { get; }

Property Value

bool

MuteMembers

If true, a user may mute users.

public bool MuteMembers { get; }

Property Value

bool

PrioritySpeaker

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

public bool PrioritySpeaker { get; }

Property Value

bool

RawValue

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

public readonly ulong RawValue { get; }

Property Value

ulong

ReadMessageHistory

If true, a user may read previous messages.

public bool ReadMessageHistory { get; }

Property Value

bool

RequestToSpeak

If true, a user may request to speak in stage channels.

public bool RequestToSpeak { get; }

Property Value

bool

SendMessages

If True, a user may send messages.

public bool SendMessages { get; }

Property Value

bool

SendMessagesInThreads

If true, a user may send messages in threads in this guild.

public bool SendMessagesInThreads { get; }

Property Value

bool

SendPolls

If true, a user can send polls.

public bool SendPolls { get; }

Property Value

bool

SendTTSMessages

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

public bool SendTTSMessages { get; }

Property Value

bool

SendVoiceMessages

If true, a user can send voice messages in this guild.

public bool SendVoiceMessages { get; }

Property Value

bool

SetVoiceChannelStatus

If true, a user can set the status of a voice channel.

public bool SetVoiceChannelStatus { get; }

Property Value

bool

Speak

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

public bool Speak { get; }

Property Value

bool

StartEmbeddedActivities

If true, a user launch application activities in voice channels in this guild.

public bool StartEmbeddedActivities { get; }

Property Value

bool

Stream

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

public bool Stream { get; }

Property Value

bool

UseApplicationCommands

If true, a user may use slash commands in this guild.

public bool UseApplicationCommands { get; }

Property Value

bool

UseClydeAI

If true, a user can use the Clyde AI bot in this guild.

public bool UseClydeAI { get; }

Property Value

bool

UseExternalEmojis

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

public bool UseExternalEmojis { get; }

Property Value

bool

UseExternalStickers

If true, a user may use external stickers in this guild.

public bool UseExternalStickers { get; }

Property Value

bool

UseSoundboard

If true, a user can use soundboard in this guild.

public bool UseSoundboard { get; }

Property Value

bool

UseVAD

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

public bool UseVAD { get; }

Property Value

bool

UserExternalApps

If true, a user-installed application can send public responses.

public bool UserExternalApps { get; }

Property Value

bool

UserExternalSounds

If true, a user can send soundboard sounds from other servers.

public bool UserExternalSounds { get; }

Property Value

bool

ViewAuditLog

If true, a user may view the audit log.

public bool ViewAuditLog { get; }

Property Value

bool

ViewChannel

If True, a user may view channels.

public bool ViewChannel { get; }

Property Value

bool

ViewGuildInsights

If true, a user may view the guild insights.

public bool ViewGuildInsights { get; }

Property Value

bool

ViewMonetizationAnalytics

If true, a user can view monetization analytics in this guild.

public bool ViewMonetizationAnalytics { get; }

Property Value

bool

Methods

Has(GuildPermission)

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

public bool Has(GuildPermission permission)

Parameters

permission GuildPermission

The permission value to check for.

Returns

bool

true if the permission is enabled, false otherwise.

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

GuildPermissions

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.