Manages API methods for GuildChannels and stores their cache.
The cache of items for this manager.
Inherited from DataManagerThe number of channels in this managers cache excluding thread channels that do not count towards a guild's maximum channels restriction.
The client that instantiated this Manager
Inherited from BaseManagerThe data structure belonging to this manager.
Inherited from DataManagerAdds the target channel to a channel's followers.
Returns
Returns created target webhook id.Name | Type | Optional | Description |
---|---|---|---|
channel | AnnouncementChannelResolvable | No | The channel to follow |
targetChannel | TextChannelResolvable | No | The channel where published announcements will be posted at |
reason | string | Yes | Reason for creating the webhook |
Creates a new channel in the guild.
Example
Example
Name | Type | Optional | Description |
---|---|---|---|
options | GuildChannelCreateOptions & { type: Type } | No | Options for creating the new channel |
Creates a webhook for the channel.
Returns
Returns the created WebhookExample
Name | Type | Optional | Description |
---|---|---|---|
options | WebhookCreateOptions | No | Options for creating the webhook |
Deletes the channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The channel to delete |
reason | string | Yes | Reason for deleting this channel |
Edits the channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The channel to edit |
options | GuildChannelEditOptions | No | Options for editing the channel |
Obtains one or more guild channels from Discord, or the channel cache if they're already available.
Example
Example
Name | Type | Optional | Description |
---|---|---|---|
id | Snowflake | No | The channel's id |
options | BaseFetchOptions | Yes | Additional options for this fetch |
Obtains all active thread channels in the guild.
Example
Name | Type | Optional | Description |
---|---|---|---|
cache | boolean | Yes | Whether to cache the fetched data |
fetchWebhooks(channel):Promise<Collection<Snowflake, Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>>>
Fetches all webhooks for the channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The channel to fetch webhooks for |
Resolves a GuildChannelResolvable to a Channel object.
Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The GuildChannel resolvable to resolve |
Resolves a GuildChannelResolvable to a channel id.
Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The GuildChannel resolvable to resolve |
Sets a new position for the guild channel.
Example
Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The channel to set the position for |
position | number | No | The new position for the guild channel |
options | SetChannelPositionOptions | Yes | Options for setting position |
Batch-updates the guild's channels' positions. Only one channel's parent can be changed at a time
Example
Name | Type | Optional | Description |
---|---|---|---|
channelPositions | readonly ChannelPosition[] | No | Channel positions to update |