hoshii / Exports / TextChannel

TextChannel

Represents a text channel

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TextChannel(data, client)

Create a new TextChannel

Parameters

NameTypeDescription
dataRawServerChannelThe raw data of the channel
clientClientThe client

Overrides

ServerChannel.constructor

Defined in

lib/structures/TextChannel.ts:39open in new window

Properties

archivedAt

archivedAt: Date

The date the server channel was archived at

Inherited from

ServerChannel.archivedAt

Defined in

lib/structures/ServerChannel.ts:48open in new window


archivedBy

archivedBy: string

The ID of the user that archived the server channel

Inherited from

ServerChannel.archivedBy

Defined in

lib/structures/ServerChannel.ts:53open in new window


categoryID

categoryID: string

The ID of the category the server channel is in

Inherited from

ServerChannel.categoryID

Defined in

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


client

client: Client

The bot client

Inherited from

ServerChannel.client

Defined in

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


createdAt

createdAt: Date

The date the server channel was created at

Inherited from

ServerChannel.createdAt

Defined in

lib/structures/ServerChannel.ts:63open in new window


createdBy

createdBy: string

The ID of the user that created the server channel

Inherited from

ServerChannel.createdBy

Defined in

lib/structures/ServerChannel.ts:68open in new window


groupID

groupID: string

The ID of the group the server channel is in

Inherited from

ServerChannel.groupID

Defined in

lib/structures/ServerChannel.ts:73open in new window


id

id: string

The ID of the item

Inherited from

ServerChannel.id

Defined in

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


isPublic

isPublic: boolean

Whether the server channel is public

Inherited from

ServerChannel.isPublic

Defined in

lib/structures/ServerChannel.ts:78open in new window


messages

messages: TypedCollection<string, RawChatMessage, ChatMessage<TextChannel>, []>

A collection of cached messages

Defined in

lib/structures/TextChannel.ts:28open in new window


name

name: string

The name of the server channel

Inherited from

ServerChannel.name

Defined in

lib/structures/ServerChannel.ts:83open in new window


parentID

parentID: string

The ID of the parent the server channel is in

Inherited from

ServerChannel.parentID

Defined in

lib/structures/ServerChannel.ts:88open in new window


serverID

serverID: string

The ID of the server the server channel is in

Inherited from

ServerChannel.serverID

Defined in

lib/structures/ServerChannel.ts:93open in new window


topic

topic: string

The topic of the server channel

Inherited from

ServerChannel.topic

Defined in

lib/structures/ServerChannel.ts:98open in new window


type

type: ServerChannelCategories

The type of the server channel

Inherited from

ServerChannel.type

Defined in

lib/structures/ServerChannel.ts:103open in new window


updatedAt

updatedAt: Date

The date the server channel was updated at

Inherited from

ServerChannel.updatedAt

Defined in

lib/structures/ServerChannel.ts:108open in new window

Methods

createMessage

createMessage<T>(options): Promise<ChatMessage<T>>

Create a message

Type parameters

NameType
Textends TextChannel<T> = TextChannel

Parameters

NameTypeDescription
optionsMessageCreateOptionsThe message options

Returns

Promise<ChatMessage<T>>

Defined in

lib/structures/TextChannel.ts:57open in new window


delete

delete(): Promise<void>

Deletes the server channel

Returns

Promise<void>

Inherited from

ServerChannel.delete

Defined in

lib/structures/ServerChannel.ts:139open in new window


deleteMessage

deleteMessage(messageID): Promise<void>

Delete a message

Parameters

NameTypeDescription
messageIDstringThe ID of the message

Returns

Promise<void>

Defined in

lib/structures/TextChannel.ts:68open in new window


edit

edit(options): Promise<ServerChannel>

Edits the server channel

Parameters

NameTypeDescription
optionsServerChannelEditOptionsThe options to edit the server channel with

Returns

Promise<ServerChannel>

Inherited from

ServerChannel.edit

Defined in

lib/structures/ServerChannel.ts:149open in new window


editMessage

editMessage<T>(messageID, options): Promise<ChatMessage<T>>

Edit a message

Type parameters

NameType
Textends TextChannel<T> = TextChannel

Parameters

NameTypeDescription
messageIDstringThe ID of the message
optionsMessageEditOptionsThe new message options

Returns

Promise<ChatMessage<T>>

Defined in

lib/structures/TextChannel.ts:78open in new window


toJSON

toJSON(): TextChannelData

Returns the JSON representation of the item

Returns

TextChannelData

Overrides

ServerChannel.toJSON

Defined in

lib/structures/TextChannel.ts:85open in new window


update

Protected update(data): void

Parameters

NameType
dataRawServerChannel

Returns

void

Inherited from

ServerChannel.update

Defined in

lib/structures/ServerChannel.ts:172open in new window

Last Updated:
Contributors: Reinhardt