Search Results for

    Show / Hide Table of Contents

    Struct OverwritePermissions

    Represents a container for a series of overwrite permissions.

    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public struct OverwritePermissions

    Constructors

    | Improve this Doc View Source

    OverwritePermissions(PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue, PermValue)

    Initializes a new ChannelPermissions struct with the provided permissions.

    Declaration
    public OverwritePermissions(PermValue createInstantInvite = PermValue.Inherit, PermValue manageChannel = PermValue.Inherit, PermValue addReactions = PermValue.Inherit, PermValue viewChannel = PermValue.Inherit, PermValue sendMessages = PermValue.Inherit, PermValue sendTTSMessages = PermValue.Inherit, PermValue manageMessages = PermValue.Inherit, PermValue embedLinks = PermValue.Inherit, PermValue attachFiles = PermValue.Inherit, PermValue readMessageHistory = PermValue.Inherit, PermValue mentionEveryone = PermValue.Inherit, PermValue useExternalEmojis = PermValue.Inherit, PermValue connect = PermValue.Inherit, PermValue speak = PermValue.Inherit, PermValue muteMembers = PermValue.Inherit, PermValue deafenMembers = PermValue.Inherit, PermValue moveMembers = PermValue.Inherit, PermValue useVoiceActivation = PermValue.Inherit, PermValue manageRoles = PermValue.Inherit, PermValue manageWebhooks = PermValue.Inherit, PermValue prioritySpeaker = PermValue.Inherit, PermValue stream = PermValue.Inherit, PermValue useSlashCommands = PermValue.Inherit, PermValue useApplicationCommands = PermValue.Inherit, PermValue requestToSpeak = PermValue.Inherit, PermValue manageThreads = PermValue.Inherit, PermValue createPublicThreads = PermValue.Inherit, PermValue createPrivateThreads = PermValue.Inherit, PermValue usePublicThreads = PermValue.Inherit, PermValue usePrivateThreads = PermValue.Inherit, PermValue useExternalStickers = PermValue.Inherit, PermValue sendMessagesInThreads = PermValue.Inherit, PermValue startEmbeddedActivities = PermValue.Inherit)
    Parameters
    Type Name Description
    PermValue createInstantInvite
    PermValue manageChannel
    PermValue addReactions
    PermValue viewChannel
    PermValue sendMessages
    PermValue sendTTSMessages
    PermValue manageMessages
    PermValue embedLinks
    PermValue attachFiles
    PermValue readMessageHistory
    PermValue mentionEveryone
    PermValue useExternalEmojis
    PermValue connect
    PermValue speak
    PermValue muteMembers
    PermValue deafenMembers
    PermValue moveMembers
    PermValue useVoiceActivation
    PermValue manageRoles
    PermValue manageWebhooks
    PermValue prioritySpeaker
    PermValue stream
    PermValue useSlashCommands
    PermValue useApplicationCommands
    PermValue requestToSpeak
    PermValue manageThreads
    PermValue createPublicThreads
    PermValue createPrivateThreads
    PermValue usePublicThreads
    PermValue usePrivateThreads
    PermValue useExternalStickers
    PermValue sendMessagesInThreads
    PermValue startEmbeddedActivities
    | Improve this Doc View Source

    OverwritePermissions(String, String)

    Creates a new OverwritePermissions with the provided allow and deny packed values after converting to ulong.

    Declaration
    public OverwritePermissions(string allowValue, string denyValue)
    Parameters
    Type Name Description
    String allowValue
    String denyValue
    | Improve this Doc View Source

    OverwritePermissions(UInt64, UInt64)

    Creates a new OverwritePermissions with the provided allow and deny packed values.

    Declaration
    public OverwritePermissions(ulong allowValue, ulong denyValue)
    Parameters
    Type Name Description
    UInt64 allowValue
    UInt64 denyValue

    Properties

    | Improve this Doc View Source

    AddReactions

    If Allowed, a user may add reactions.

    Declaration
    public readonly PermValue AddReactions { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    AllowValue

    Gets a packed value representing all the allowed permissions in this OverwritePermissions.

    Declaration
    public readonly ulong AllowValue { get; }
    Property Value
    Type Description
    UInt64
    | Improve this Doc View Source

    AttachFiles

    If Allowed, a user may send files.

    Declaration
    public readonly PermValue AttachFiles { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    Connect

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

    Declaration
    public readonly PermValue Connect { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    CreateInstantInvite

    If Allowed, a user may create invites.

    Declaration
    public readonly PermValue CreateInstantInvite { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    CreatePrivateThreads

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

    Declaration
    public readonly PermValue CreatePrivateThreads { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    CreatePublicThreads

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

    Declaration
    public readonly PermValue CreatePublicThreads { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    DeafenMembers

    If Allowed, a user may deafen users.

    Declaration
    public readonly PermValue DeafenMembers { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    DenyValue

    Gets a packed value representing all the denied permissions in this OverwritePermissions.

    Declaration
    public readonly ulong DenyValue { get; }
    Property Value
    Type Description
    UInt64
    | Improve this Doc View Source

    EmbedLinks

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

    Declaration
    public readonly PermValue EmbedLinks { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    InheritAll

    Gets a blank OverwritePermissions that inherits all permissions.

    Declaration
    public static readonly OverwritePermissions InheritAll { get; }
    Property Value
    Type Description
    OverwritePermissions
    | Improve this Doc View Source

    ManageChannel

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

    Declaration
    public readonly PermValue ManageChannel { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    ManageMessages

    If Allowed, a user may delete messages.

    Declaration
    public readonly PermValue ManageMessages { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    ManageRoles

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

    Declaration
    public readonly PermValue ManageRoles { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    ManageThreads

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

    Declaration
    public readonly PermValue ManageThreads { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    ManageWebhooks

    If True, a user may edit the webhooks for this channel.

    Declaration
    public readonly PermValue ManageWebhooks { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    MentionEveryone

    If Allowed, a user may mention @everyone.

    Declaration
    public readonly PermValue MentionEveryone { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    MoveMembers

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

    Declaration
    public readonly PermValue MoveMembers { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    MuteMembers

    If Allowed, a user may mute users.

    Declaration
    public readonly PermValue MuteMembers { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    PrioritySpeaker

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

    Declaration
    public readonly PermValue PrioritySpeaker { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    ReadMessageHistory

    If Allowed, a user may read previous messages.

    Declaration
    public readonly PermValue ReadMessageHistory { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    RequestToSpeak

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

    Declaration
    public readonly PermValue RequestToSpeak { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    SendMessages

    If Allowed, a user may send messages.

    Declaration
    public readonly PermValue SendMessages { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    SendMessagesInThreads

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

    Declaration
    public readonly PermValue SendMessagesInThreads { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    SendTTSMessages

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

    Declaration
    public readonly PermValue SendTTSMessages { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    Speak

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

    Declaration
    public readonly PermValue Speak { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    StartEmbeddedActivities

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

    Declaration
    public readonly PermValue StartEmbeddedActivities { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    Stream

    If Allowed, a user may go live in a voice channel.

    Declaration
    public readonly PermValue Stream { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    UseApplicationCommands

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

    Declaration
    public readonly PermValue UseApplicationCommands { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    UseExternalEmojis

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

    Declaration
    public readonly PermValue UseExternalEmojis { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    UseExternalStickers

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

    Declaration
    public readonly PermValue UseExternalStickers { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    UseVAD

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

    Declaration
    public readonly PermValue UseVAD { get; }
    Property Value
    Type Description
    PermValue
    | Improve this Doc View Source

    ViewChannel

    If Allowed, a user may join channels.

    Declaration
    public readonly PermValue ViewChannel { get; }
    Property Value
    Type Description
    PermValue

    Methods

    | Improve this Doc View Source

    AllowAll(IChannel)

    Gets a OverwritePermissions that grants all permissions for the given channel.

    Declaration
    public static OverwritePermissions AllowAll(IChannel channel)
    Parameters
    Type Name Description
    IChannel channel
    Returns
    Type Description
    OverwritePermissions
    | Improve this Doc View Source

    DenyAll(IChannel)

    Gets a OverwritePermissions that denies all permissions for the given channel.

    Declaration
    public static OverwritePermissions DenyAll(IChannel channel)
    Parameters
    Type Name Description
    IChannel channel
    Returns
    Type Description
    OverwritePermissions
    | Improve this Doc View Source

    Modify(Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>, Nullable<PermValue>)

    Initializes a new OverwritePermissions from the current one, changing the provided non-null permissions.

    Declaration
    public OverwritePermissions Modify(PermValue? createInstantInvite = null, PermValue? manageChannel = null, PermValue? addReactions = null, PermValue? viewChannel = null, PermValue? sendMessages = null, PermValue? sendTTSMessages = null, PermValue? manageMessages = null, PermValue? embedLinks = null, PermValue? attachFiles = null, PermValue? readMessageHistory = null, PermValue? mentionEveryone = null, PermValue? useExternalEmojis = null, PermValue? connect = null, PermValue? speak = null, PermValue? muteMembers = null, PermValue? deafenMembers = null, PermValue? moveMembers = null, PermValue? useVoiceActivation = null, PermValue? manageRoles = null, PermValue? manageWebhooks = null, PermValue? prioritySpeaker = null, PermValue? stream = null, PermValue? useSlashCommands = null, PermValue? useApplicationCommands = null, PermValue? requestToSpeak = null, PermValue? manageThreads = null, PermValue? createPublicThreads = null, PermValue? createPrivateThreads = null, PermValue? usePublicThreads = null, PermValue? usePrivateThreads = null, PermValue? useExternalStickers = null, PermValue? sendMessagesInThreads = null, PermValue? startEmbeddedActivities = null)
    Parameters
    Type Name Description
    Nullable<PermValue> createInstantInvite
    Nullable<PermValue> manageChannel
    Nullable<PermValue> addReactions
    Nullable<PermValue> viewChannel
    Nullable<PermValue> sendMessages
    Nullable<PermValue> sendTTSMessages
    Nullable<PermValue> manageMessages
    Nullable<PermValue> embedLinks
    Nullable<PermValue> attachFiles
    Nullable<PermValue> readMessageHistory
    Nullable<PermValue> mentionEveryone
    Nullable<PermValue> useExternalEmojis
    Nullable<PermValue> connect
    Nullable<PermValue> speak
    Nullable<PermValue> muteMembers
    Nullable<PermValue> deafenMembers
    Nullable<PermValue> moveMembers
    Nullable<PermValue> useVoiceActivation
    Nullable<PermValue> manageRoles
    Nullable<PermValue> manageWebhooks
    Nullable<PermValue> prioritySpeaker
    Nullable<PermValue> stream
    Nullable<PermValue> useSlashCommands
    Nullable<PermValue> useApplicationCommands
    Nullable<PermValue> requestToSpeak
    Nullable<PermValue> manageThreads
    Nullable<PermValue> createPublicThreads
    Nullable<PermValue> createPrivateThreads
    Nullable<PermValue> usePublicThreads
    Nullable<PermValue> usePrivateThreads
    Nullable<PermValue> useExternalStickers
    Nullable<PermValue> sendMessagesInThreads
    Nullable<PermValue> startEmbeddedActivities
    Returns
    Type Description
    OverwritePermissions
    | Improve this Doc View Source

    ToAllowList()

    Creates a of all the ChannelPermission values that are allowed.

    Declaration
    public List<ChannelPermission> ToAllowList()
    Returns
    Type Description
    List<ChannelPermission>

    A of all allowed ChannelPermission flags. If none, the list will be empty.

    | Improve this Doc View Source

    ToDenyList()

    Creates a of all the ChannelPermission values that are denied.

    Declaration
    public List<ChannelPermission> ToDenyList()
    Returns
    Type Description
    List<ChannelPermission>

    A of all denied ChannelPermission flags. If none, the list will be empty.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2023 3.10.0