Struct ChannelPermissions
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
public struct ChannelPermissions
- Inherited Members
Constructors
ChannelPermissions(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 ChannelPermissions with the provided permissions.
public ChannelPermissions(bool createInstantInvite = false, bool manageChannel = false, bool addReactions = 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 manageRoles = false, bool manageWebhooks = false, bool useApplicationCommands = false, bool requestToSpeak = false, bool manageThreads = false, bool createPublicThreads = false, bool createPrivateThreads = false, bool useExternalStickers = false, bool sendMessagesInThreads = false, bool startEmbeddedActivities = false, bool useSoundboard = false, bool createEvents = false, bool sendVoiceMessages = false, bool useClydeAI = false, bool setVoiceChannelStatus = false, bool sendPolls = false, bool useExternalApps = false)
Parameters
createInstantInvite
boolmanageChannel
booladdReactions
boolviewChannel
boolsendMessages
boolsendTTSMessages
boolmanageMessages
boolembedLinks
boolattachFiles
boolreadMessageHistory
boolmentionEveryone
booluseExternalEmojis
boolconnect
boolspeak
boolmuteMembers
booldeafenMembers
boolmoveMembers
booluseVoiceActivation
boolprioritySpeaker
boolstream
boolmanageRoles
boolmanageWebhooks
booluseApplicationCommands
boolrequestToSpeak
boolmanageThreads
boolcreatePublicThreads
boolcreatePrivateThreads
booluseExternalStickers
boolsendMessagesInThreads
boolstartEmbeddedActivities
booluseSoundboard
boolcreateEvents
boolsendVoiceMessages
booluseClydeAI
boolsetVoiceChannelStatus
boolsendPolls
booluseExternalApps
bool
ChannelPermissions(ulong)
Creates a new ChannelPermissions with the provided packed value.
public ChannelPermissions(ulong rawValue)
Parameters
rawValue
ulong
Fields
Category
Gets a ChannelPermissions that grants all permissions for category channels.
public static readonly ChannelPermissions Category
Field Value
DM
Gets a ChannelPermissions that grants all permissions for direct message channels.
public static readonly ChannelPermissions DM
Field Value
Forum
Gets a ChannelPermissions that grants all permissions for forum channels.
public static readonly ChannelPermissions Forum
Field Value
Group
Gets a ChannelPermissions that grants all permissions for group channels.
public static readonly ChannelPermissions Group
Field Value
Media
Gets a ChannelPermissions that grants all permissions for media channels.
public static readonly ChannelPermissions Media
Field Value
None
Gets a blank ChannelPermissions that grants no permissions.
public static readonly ChannelPermissions None
Field Value
- ChannelPermissions
A ChannelPermissions structure that does not contain any set permissions.
Stage
Gets a ChannelPermissions that grants all permissions for stage channels.
public static readonly ChannelPermissions Stage
Field Value
Text
Gets a ChannelPermissions that grants all permissions for text channels.
public static readonly ChannelPermissions Text
Field Value
Voice
Gets a ChannelPermissions that grants all permissions for voice channels.
public static readonly ChannelPermissions Voice
Field Value
Properties
AddReactions
If true, a user may add reactions.
public bool AddReactions { get; }
Property Value
AttachFiles
If true, a user may send files.
public bool AttachFiles { 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 edit and cancel events in this channel.
public bool CreateEvents { 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
ManageChannel
If true, a user may create, delete and modify this channel.
public bool ManageChannel { get; }
Property Value
ManageMessages
If true, a user may delete messages.
public bool ManageMessages { get; }
Property Value
ManageRoles
If true, a user may adjust role permissions. This also implicitly grants all other permissions.
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 channel.
public bool ManageWebhooks { get; }
Property Value
MentionEveryone
If true, a user may mention @everyone.
public bool MentionEveryone { 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 ChannelPermissions.
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 channel.
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 application commands in this guild.
public bool UseApplicationCommands { get; }
Property Value
UseClydeAI
If true, a user can use the Clyde AI bot in this channel.
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 a voice channel.
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
ViewChannel
If true, a user may view channels.
public bool ViewChannel { get; }
Property Value
Methods
All(IChannel)
Gets a ChannelPermissions that grants all permissions for a given channel type.
public static ChannelPermissions All(IChannel channel)
Parameters
channel
IChannel
Returns
Exceptions
- ArgumentException
Unknown channel type.
Has(ChannelPermission)
public bool Has(ChannelPermission permission)
Parameters
permission
ChannelPermission
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?)
Creates a new ChannelPermissions from this one, changing the provided non-null permissions.
public ChannelPermissions Modify(bool? createInstantInvite = null, bool? manageChannel = null, bool? addReactions = 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? manageRoles = null, bool? manageWebhooks = null, bool? useApplicationCommands = null, bool? requestToSpeak = null, bool? manageThreads = null, bool? createPublicThreads = null, bool? createPrivateThreads = null, bool? useExternalStickers = null, bool? sendMessagesInThreads = null, bool? startEmbeddedActivities = null, bool? useSoundboard = null, bool? createEvents = null, bool? sendVoiceMessages = null, bool? useClydeAI = null, bool? setVoiceChannelStatus = null, bool? sendPolls = null, bool? useExternalApps = null)
Parameters
createInstantInvite
bool?manageChannel
bool?addReactions
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?manageRoles
bool?manageWebhooks
bool?useApplicationCommands
bool?requestToSpeak
bool?manageThreads
bool?createPublicThreads
bool?createPrivateThreads
bool?useExternalStickers
bool?sendMessagesInThreads
bool?startEmbeddedActivities
bool?useSoundboard
bool?createEvents
bool?sendVoiceMessages
bool?useClydeAI
bool?setVoiceChannelStatus
bool?sendPolls
bool?useExternalApps
bool?
Returns
ToList()
public List<ChannelPermission> ToList()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.