Table of Contents

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)

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)

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

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

ChannelPermissions

DM

Gets a ChannelPermissions that grants all permissions for direct message channels.

public static readonly ChannelPermissions DM

Field Value

ChannelPermissions

Forum

Gets a ChannelPermissions that grants all permissions for forum channels.

public static readonly ChannelPermissions Forum

Field Value

ChannelPermissions

Group

Gets a ChannelPermissions that grants all permissions for group channels.

public static readonly ChannelPermissions Group

Field Value

ChannelPermissions

Media

Gets a ChannelPermissions that grants all permissions for media channels.

public static readonly ChannelPermissions Media

Field Value

ChannelPermissions

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

ChannelPermissions

Text

Gets a ChannelPermissions that grants all permissions for text channels.

public static readonly ChannelPermissions Text

Field Value

ChannelPermissions

Voice

Gets a ChannelPermissions that grants all permissions for voice channels.

public static readonly ChannelPermissions Voice

Field Value

ChannelPermissions

Properties

AddReactions

If true, a user may add reactions.

public bool AddReactions { get; }

Property Value

bool

AttachFiles

If true, a user may send files.

public bool AttachFiles { 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 edit and cancel events in this channel.

public bool CreateEvents { 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

ManageChannel

If true, a user may create, delete and modify this channel.

public bool ManageChannel { get; }

Property Value

bool

ManageMessages

If true, a user may delete messages.

public bool ManageMessages { get; }

Property Value

bool

ManageRoles

If true, a user may adjust role permissions. This also implicitly grants all other permissions.

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

public bool ManageWebhooks { get; }

Property Value

bool

MentionEveryone

If true, a user may mention @everyone.

public bool MentionEveryone { 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 ChannelPermissions.

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

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

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 application commands in this guild.

public bool UseApplicationCommands { get; }

Property Value

bool

UseClydeAI

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

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 a voice channel.

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

ViewChannel

If true, a user may view channels.

public bool ViewChannel { get; }

Property Value

bool

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

ChannelPermissions

Exceptions

ArgumentException

Unknown channel type.

Has(ChannelPermission)

public bool Has(ChannelPermission permission)

Parameters

permission ChannelPermission

Returns

bool

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

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)

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?

Returns

ChannelPermissions

ToList()

public List<ChannelPermission> ToList()

Returns

List<ChannelPermission>

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.