Abstract
Represents a guild channel from any of the following: - TextChannel - VoiceChannel - CategoryChannel - AnnouncementChannel - StageChannel - ForumChannel - MediaChannel
Extends
BaseChannelConstructs a new instance of the
GuildChannel
className | Type | Optional | Description |
---|---|---|---|
guild | Guild | No | None |
data | RawGuildChannelData | Yes | None |
client | Client<true> | Yes | None |
immediatePatch | boolean | Yes | None |
The flags that are applied to the channel. This is only
null
in a PartialGroupDMChannel. In all other cases, it is not null
.The channel's id
Inherited from BaseChannelA collection of cached members of this channel, mapped by their ids. Members that can view this channel, if the channel is text-based. Members in the channel, if the channel is voice-based.
Whether this Channel is a partial This is always false outside of DM channels.
Inherited from BaseChannelIf the permissionOverwrites match the parent channel, null if no parent
The URL to the channel
Inherited from BaseChannelClones this channel.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildChannelCloneOptions | Yes | The options for cloning this channel |
Deletes this channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for deleting this channel |
Edits the channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | GuildChannelEditOptions | No | The options to provide |
Checks if this channel has the same type, topic, position, name, overwrites, and id as another channel. In most cases, a simple
channel.id === channel2.id
will do, and is much faster too.Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannel | No | Channel to compare with |
Fetches this channel.
Name | Type | Optional | Description |
---|---|---|---|
force | boolean | Yes | Whether to skip the cache check and request the API |
Indicates whether this channel is DM-based (either a or a PartialGroupDMChannel).
Inherited from BaseChannelIndicates whether this channel is sendable.
Inherited from BaseChannelIndicates whether this channel is text-based.
Indicates whether this channel is a .
Inherited from BaseChannelIndicates whether this channel is .
Inherited from BaseChannelIndicates whether this channel is .
Inherited from BaseChannelLocks in the permission overwrites from the parent channel.
Gets the overall set of permissions for a member or role in this channel, taking into account channel overwrites.
Returns
Name | Type | Optional | Description |
---|---|---|---|
memberOrRole | GuildMember | Role | No | The member or role to obtain the overall permissions for |
checkAdmin | boolean | Yes | Whether having the PermissionFlagsBits.Administrator permission will return all permissions |
Sets a new name for the guild channel.
Example
Sets the parent of this channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
channel | CategoryChannelResolvable | null | No | The category channel to set as the parent |
options | SetParentOptions | Yes | The options for setting the parent |
Sets a new position for the guild channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
position | number | No | The new position for the guild channel |
options | SetChannelPositionOptions | Yes | Options for setting position |
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.