Skip to main content

ChannelToggles

@discordeno/botDocs


Documentation / @discordeno/bot / ChannelToggles

Class: ChannelToggles

Extends

Constructors

new ChannelToggles()

new ChannelToggles(channelOrBitfield): ChannelToggles

Parameters

channelOrBitfield: number | DiscordChannel

Returns

ChannelToggles

Overrides

ToggleBitfield.constructor

Defined in

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

Properties

bitfield

bitfield: number = 0

Inherited from

ToggleBitfield.bitfield

Defined in

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

Accessors

archived

Get Signature

get archived(): boolean

Whether or not this thread channel is archived.

Returns

boolean

Defined in

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


invitable

Get Signature

get invitable(): boolean

Whether or not this thread channel is invitable.

Returns

boolean

Defined in

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


locked

Get Signature

get locked(): boolean

Whether or not this thread channel is locked.

Returns

boolean

Defined in

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


managed

Get Signature

get managed(): boolean

Returns

boolean

Defined in

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


newlyCreated

Get Signature

get newlyCreated(): boolean

Whether or not this thread channel is newly created.

Returns

boolean

Defined in

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


nsfw

Get Signature

get nsfw(): boolean

Whether or not this channel is an nsfw channel.

Returns

boolean

Defined in

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

Methods

add()

add(bits): this

Adds some bits to the bitfield.

Parameters

bits: number

Returns

this

Inherited from

ToggleBitfield.add

Defined in

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


contains()

contains(bits): boolean

Tests whether or not this bitfield has the permission requested.

Parameters

bits: number

Returns

boolean

Inherited from

ToggleBitfield.contains

Defined in

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


has()

has(permissions): boolean

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

Defined in

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


list()

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

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>

Defined in

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


remove()

remove(bits): this

Removes some bits from the bitfield.

Parameters

bits: number

Returns

this

Inherited from

ToggleBitfield.remove

Defined in

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


toJSON()

toJSON(): number

Returns

number

Inherited from

ToggleBitfield.toJSON

Defined in

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