Skip to main content

ChannelToggles

@discordeno/bot


Documentation / @discordeno/bot / ChannelToggles

Class: ChannelToggles

Defined in: packages/bot/src/transformers/toggles/channel.ts:19

Extends

Constructors

new ChannelToggles()

new ChannelToggles(channelOrBitfield): ChannelToggles

Defined in: packages/bot/src/transformers/toggles/channel.ts:20

Parameters

channelOrBitfield

number | DiscordChannel

Returns

ChannelToggles

Overrides

ToggleBitfield.constructor

Properties

bitfield

bitfield: number = 0

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:2

Inherited from

ToggleBitfield.bitfield

Accessors

archived

Get Signature

get archived(): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:51

Whether or not this thread channel is archived.

Returns

boolean


invitable

Get Signature

get invitable(): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:46

Whether or not this thread channel is invitable.

Returns

boolean


locked

Get Signature

get locked(): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:41

Whether or not this thread channel is locked.

Returns

boolean


managed

Get Signature

get managed(): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:60

Returns

boolean


newlyCreated

Get Signature

get newlyCreated(): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:56

Whether or not this thread channel is newly created.

Returns

boolean


nsfw

Get Signature

get nsfw(): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:36

Whether or not this channel is an nsfw channel.

Returns

boolean

Methods

add()

add(bits): this

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:14

Adds some bits to the bitfield.

Parameters

bits

number

Returns

this

Inherited from

ToggleBitfield.add


contains()

contains(bits): boolean

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:9

Tests whether or not this bitfield has the permission requested.

Parameters

bits

number

Returns

boolean

Inherited from

ToggleBitfield.contains


has()

has(permissions): boolean

Defined in: packages/bot/src/transformers/toggles/channel.ts:65

Checks whether or not the permissions exist in this

Parameters

permissions

"nsfw" | "newlyCreated" | "locked" | "invitable" | "archived" | "managed" | ("nsfw" | "newlyCreated" | "locked" | "invitable" | "archived" | "managed")[]

Returns

boolean


list()

list(): Record<"nsfw" | "newlyCreated" | "locked" | "invitable" | "archived" | "managed", boolean>

Defined in: packages/bot/src/transformers/toggles/channel.ts:72

Lists all the toggles for the role and whether or not each is true or false.

Returns

Record<"nsfw" | "newlyCreated" | "locked" | "invitable" | "archived" | "managed", boolean>


remove()

remove(bits): this

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:20

Removes some bits from the bitfield.

Parameters

bits

number

Returns

this

Inherited from

ToggleBitfield.remove


toJSON()

toJSON(): number

Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:25

Returns

number

Inherited from

ToggleBitfield.toJSON