Creates a new ServerChannel instance.
The client instance.
The raw data for the server channel from the API.
Readonly
clientThe client instance.
The description of the channel, or null
if none is set.
The icon of the channel, or null
if none is set.
The unique identifier for the object.
The name of the channel.
Whether the channel is marked as NSFW (Not Safe For Work).
The permission overwrites for the channel.
The ID of the server this channel belongs to.
The type of the channel. Defaults to "UNKNOWN".
Retrieves the category this channel belongs to, if any.
The category instance, or null
if the channel is not in a category.
Gets the timestamp (in milliseconds) when the channel was created.
The timestamp of the channel's creation.
Creates a deep clone of the object.
A clone of the object.
Updates the object with new data and returns a clone of the object.
The data to update the object with.
Optional
clear: string[]Fields to clear in the object.
A clone of the updated object.
Deletes the current channel instance from the client's channel collection.
This method interacts with the client's channel management system to remove the channel. Once deleted, the channel will no longer be accessible through the client.
A promise that resolves when the channel has been successfully deleted.
Compares this object with another to determine if they are equal.
Optional
obj: null | ServerChannelThe object to compare with.
true
if the objects are equal, otherwise false
.
Checks if the channel is part of a server.
True if the channel is a server channel, otherwise false.
Checks if the channel is a group channel.
True if the channel is a group channel, otherwise false.
Checks if the channel is a text-based channel.
True if the channel is a text-based channel, otherwise false.
Checks if the channel is a voice channel.
True if the channel is a voice channel, otherwise false.
Converts the channel to a string representation.
A string representation of the channel in the format <#channelId>
.
Represents a server channel, which can be a text or voice channel.