hoshii / Exports / TextChannel
TextChannel
Represents a text channel
Hierarchy
↳
TextChannel
Table of contents
Constructors
Properties
- archivedAt
- archivedBy
- categoryID
- client
- createdAt
- createdBy
- groupID
- id
- isPublic
- messages
- name
- parentID
- serverID
- topic
- type
- updatedAt
Methods
Constructors
constructor
• new TextChannel(data, client)
Create a new TextChannel
Parameters
| Name | Type | Description |
|---|---|---|
data | RawServerChannel | The raw data of the channel |
client | Client | The client |
Overrides
Defined in
lib/structures/TextChannel.ts:39
Properties
archivedAt
• archivedAt: Date
The date the server channel was archived at
Inherited from
Defined in
lib/structures/ServerChannel.ts:48
archivedBy
• archivedBy: string
The ID of the user that archived the server channel
Inherited from
Defined in
lib/structures/ServerChannel.ts:53
categoryID
• categoryID: string
The ID of the category the server channel is in
Inherited from
Defined in
lib/structures/ServerChannel.ts:58
client
• client: Client
The bot client
Inherited from
Defined in
createdAt
• createdAt: Date
The date the server channel was created at
Inherited from
Defined in
lib/structures/ServerChannel.ts:63
createdBy
• createdBy: string
The ID of the user that created the server channel
Inherited from
Defined in
lib/structures/ServerChannel.ts:68
groupID
• groupID: string
The ID of the group the server channel is in
Inherited from
Defined in
lib/structures/ServerChannel.ts:73
id
• id: string
The ID of the item
Inherited from
Defined in
isPublic
• isPublic: boolean
Whether the server channel is public
Inherited from
Defined in
lib/structures/ServerChannel.ts:78
messages
• messages: TypedCollection<string, RawChatMessage, ChatMessage<TextChannel>, []>
A collection of cached messages
Defined in
lib/structures/TextChannel.ts:28
name
• name: string
The name of the server channel
Inherited from
Defined in
lib/structures/ServerChannel.ts:83
parentID
• parentID: string
The ID of the parent the server channel is in
Inherited from
Defined in
lib/structures/ServerChannel.ts:88
serverID
• serverID: string
The ID of the server the server channel is in
Inherited from
Defined in
lib/structures/ServerChannel.ts:93
topic
• topic: string
The topic of the server channel
Inherited from
Defined in
lib/structures/ServerChannel.ts:98
type
• type: ServerChannelCategories
The type of the server channel
Inherited from
Defined in
lib/structures/ServerChannel.ts:103
updatedAt
• updatedAt: Date
The date the server channel was updated at
Inherited from
Defined in
lib/structures/ServerChannel.ts:108
Methods
createMessage
▸ createMessage<T>(options): Promise<ChatMessage<T>>
Create a message
Type parameters
| Name | Type |
|---|---|
T | extends TextChannel<T> = TextChannel |
Parameters
| Name | Type | Description |
|---|---|---|
options | MessageCreateOptions | The message options |
Returns
Promise<ChatMessage<T>>
Defined in
lib/structures/TextChannel.ts:57
delete
▸ delete(): Promise<void>
Deletes the server channel
Returns
Promise<void>
Inherited from
Defined in
lib/structures/ServerChannel.ts:139
deleteMessage
▸ deleteMessage(messageID): Promise<void>
Delete a message
Parameters
| Name | Type | Description |
|---|---|---|
messageID | string | The ID of the message |
Returns
Promise<void>
Defined in
lib/structures/TextChannel.ts:68
edit
▸ edit(options): Promise<ServerChannel>
Edits the server channel
Parameters
| Name | Type | Description |
|---|---|---|
options | ServerChannelEditOptions | The options to edit the server channel with |
Returns
Promise<ServerChannel>
Inherited from
Defined in
lib/structures/ServerChannel.ts:149
editMessage
▸ editMessage<T>(messageID, options): Promise<ChatMessage<T>>
Edit a message
Type parameters
| Name | Type |
|---|---|
T | extends TextChannel<T> = TextChannel |
Parameters
| Name | Type | Description |
|---|---|---|
messageID | string | The ID of the message |
options | MessageEditOptions | The new message options |
Returns
Promise<ChatMessage<T>>
Defined in
lib/structures/TextChannel.ts:78
toJSON
▸ toJSON(): TextChannelData
Returns the JSON representation of the item
Returns
Overrides
Defined in
lib/structures/TextChannel.ts:85
update
▸ Protected update(data): void
Parameters
| Name | Type |
|---|---|
data | RawServerChannel |
Returns
void