Table of Contents

Struct GuildPermissions

Namespace
Kook
Assembly
Kook.Net.Core.dll

Represents a set of permissions for a guild.

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)

Creates a new GuildPermissions structure with the provided permissions.

public GuildPermissions(bool administrator = false, bool manageGuild = false, bool viewAuditLog = false, bool createInvites = false, bool manageInvites = false, bool manageChannels = false, bool kickMembers = false, bool banMembers = false, bool manageEmojis = false, bool changeNickname = false, bool manageRoles = false, bool viewChannel = false, bool sendMessages = false, bool manageMessages = false, bool attachFiles = false, bool connect = false, bool manageVoice = false, bool mentionEveryone = false, bool addReactions = false, bool followReactions = false, bool passiveConnect = false, bool onlyPushToTalk = false, bool useVoiceActivity = false, bool speak = false, bool deafenMembers = false, bool muteMembers = false, bool manageNicknames = false, bool playSoundtrack = false, bool shareScreen = false)

Parameters

administrator bool
manageGuild bool
viewAuditLog bool
createInvites bool
manageInvites bool
manageChannels bool
kickMembers bool
banMembers bool
manageEmojis bool
changeNickname bool
manageRoles bool
viewChannel bool
sendMessages bool
manageMessages bool
attachFiles bool
connect bool
manageVoice bool
mentionEveryone bool
addReactions bool
followReactions bool
passiveConnect bool
onlyPushToTalk bool
useVoiceActivity bool
speak bool
deafenMembers bool
muteMembers bool
manageNicknames bool
playSoundtrack bool
shareScreen 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

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

CreateInvites

If true, a user may create invites.

public bool CreateInvites { get; }

Property Value

bool

DeafenMembers

If true, a user may deafen users.

public bool DeafenMembers { get; }

Property Value

bool

FollowReactions

If true, a user may follow added reactions.

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

ManageEmojis

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

public bool ManageEmojis { get; }

Property Value

bool

ManageGuild

If true, a user may adjust guild properties.

public bool ManageGuild { get; }

Property Value

bool

ManageInvites

If true, a user may view and revoke invites.

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

ManageVoice

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

public bool ManageVoice { get; }

Property Value

bool

MentionEveryone

If true, a user may mention all users.

public bool MentionEveryone { get; }

Property Value

bool

MuteMembers

If true, a user may mute users.

public bool MuteMembers { get; }

Property Value

bool

OnlyPushToTalk

If true, a user may speak only via push-to-talk.

public bool OnlyPushToTalk { get; }

Property Value

bool

PassiveConnect

If true, a user may connect to a voice channel only when the user is invited or moved by other users.

public bool PassiveConnect { get; }

Property Value

bool

PlaySoundtrack

If true, a user may play soundtracks in a voice channel.

public bool PlaySoundtrack { get; }

Property Value

bool

RawValue

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

public readonly ulong RawValue { get; }

Property Value

ulong

SendMessages

If true, a user may send messages.

public bool SendMessages { get; }

Property Value

bool

ShareScreen

If true, a user may share screen in a voice channel.

public bool ShareScreen { get; }

Property Value

bool

Speak

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

public bool Speak { get; }

Property Value

bool

UseVoiceActivity

If true, a user may use voice activation.

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

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

Creates a new GuildPermissions from this one, changing the provided non-null permissions.

public GuildPermissions Modify(bool? administrator = null, bool? manageGuild = null, bool? viewAuditLog = null, bool? createInvites = null, bool? manageInvites = null, bool? manageChannels = null, bool? kickMembers = null, bool? banMembers = null, bool? manageEmojis = null, bool? changeNickname = null, bool? manageRoles = null, bool? viewChannel = null, bool? sendMessages = null, bool? manageMessages = null, bool? attachFiles = null, bool? connect = null, bool? manageVoice = null, bool? mentionEveryone = null, bool? addReactions = null, bool? followReactions = null, bool? passiveConnect = null, bool? onlyPushToTalk = null, bool? useVoiceActivity = null, bool? speak = null, bool? deafenMembers = null, bool? muteMembers = null, bool? manageNicknames = null, bool? playSoundtrack = null, bool? shareScreen = null)

Parameters

administrator bool?
manageGuild bool?
viewAuditLog bool?
createInvites bool?
manageInvites bool?
manageChannels bool?
kickMembers bool?
banMembers bool?
manageEmojis bool?
changeNickname bool?
manageRoles bool?
viewChannel bool?
sendMessages bool?
manageMessages bool?
attachFiles bool?
connect bool?
manageVoice bool?
mentionEveryone bool?
addReactions bool?
followReactions bool?
passiveConnect bool?
onlyPushToTalk bool?
useVoiceActivity bool?
speak bool?
deafenMembers bool?
muteMembers bool?
manageNicknames bool?
playSoundtrack bool?
shareScreen 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()

Gets the raw value of the permissions.

public override string ToString()

Returns

string