hoshii / Exports / Channel

Channel

Represents a channel

Hierarchy

  • Base<string>

    Channel

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Channel(data, client)

Create a new Channel

Parameters

NameTypeDescription
dataRawServerChannelThe raw data of the channel
clientClientThe client

Overrides

Base.constructor

Defined in

lib/structures/Channel.ts:38open in new window

Properties

client

client: Client

The bot client

Inherited from

Base.client

Defined in

lib/structures/Base.ts:13open in new window


id

id: string

The ID of the item

Inherited from

Base.id

Defined in

lib/structures/Base.ts:16open in new window


name

name: string

The name of the channel

Defined in

lib/structures/Channel.ts:26open in new window


type

type: ServerChannelCategories

The type of the channel

Defined in

lib/structures/Channel.ts:31open in new window

Methods

delete

delete(): Promise<void>

Delete the channel

Returns

Promise<void>

Defined in

lib/structures/Channel.ts:49open in new window


edit

edit(options): Promise<Channel>

Edit the channel

Parameters

NameTypeDescription
optionsServerChannelEditOptionsThe options to edit the channel with

Returns

Promise<Channel>

Defined in

lib/structures/Channel.ts:58open in new window


toJSON

toJSON(): ChannelData

Returns the JSON representation of the item

Returns

ChannelData

Overrides

Base.toJSON

Defined in

lib/structures/Channel.ts:92open in new window


update

Protected update(data): void

Parameters

NameType
dataunknown

Returns

void

Inherited from

Base.update

Defined in

lib/structures/Base.ts:64open in new window


from

Static from<T>(data, client): T

Type parameters

NameType
Textends AnyChannel = AnyChannel

Parameters

NameType
dataRawServerChannel
clientClient

Returns

T

Defined in

lib/structures/Channel.ts:62open in new window

Last Updated:
Contributors: Reinhardt