class ThreadOnlyChannel
extends
TextBasedChannelMixin(GuildChannel, true, [ 'send', 'lastMessage', 'lastPinAt', 'bulkDelete', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'createMessageComponentCollector', 'awaitMessageComponent',])export abstract class ThreadOnlyChannel extends TextBasedChannelMixin(GuildChannel, true, [ 'send', 'lastMessage', 'lastPinAt', 'bulkDelete', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'createMessageComponentCollector', 'awaitMessageComponent',])
Represents symbols utilised by thread-only channels.
GuildForumTag[] availableTags :
The set of tags that can be used in this channel.
ThreadAutoArchiveDuration | null defaultAutoArchiveDuration :
The default auto archive duration for newly created threads in this channel.
DefaultReactionEmoji | null defaultReactionEmoji :
The emoji to show in the add reaction button on a thread in a guild forum channel
SortOrderType | null defaultSortOrder :
The default sort order mode used to order posts
The initial rate limit per user (slowmode) to set on newly created threads in a channel.
boolean nsfw :
If this channel is considered NSFW.
GuildForumThreadManager threads :
A manager of the threads belonging to this channel
The type of the channel
createInviteoptions?: InviteCreateOptions) : Promise<Invite> (
Creates an invite to this guild channel.
// Create an invite to a channel
channel.createInvite()
.then(invite => console.log(`Created an invite with a code of ${invite.code}`))
.catch(console.error);
createWebhookoptions?: ChannelWebhookCreateOptions) : Promise<Webhook> (
Creates a webhook for the channel.
// Create a webhook for the current channel
channel.createWebhook({
name: 'Snek',
avatar: 'https://i.imgur.com/mI8XcpG.jpg',
reason: 'Needed a cool new Webhook'
})
.then(console.log)
.catch(console.error)
Returns: Returns the created Webhook *
fetchInvitescache?: boolean) : Promise<Collection<string, Invite>> (
Fetches a collection of invites to this guild channel. Resolves with a collection mapping invites by their codes.
fetchWebhooksPromise<Collection<Snowflake, Webhook>> () :
Fetches all webhooks for the channel.
// Fetch webhooks
channel.fetchWebhooks()
.then(hooks => console.log(`This channel has ${hooks.size} hooks`))
.catch(console.error);
setAvailableTagsavailableTags: GuildForumTagData[]reason?: string) : Promise<this> (
Sets the available tags for this forum channel
setDefaultAutoArchiveDurationdefaultAutoArchiveDuration: ThreadAutoArchiveDurationreason?: string) : Promise<this> (
Sets the default auto archive duration for all newly created threads in this channel.
setDefaultReactionEmojidefaultReactionEmoji: DefaultReactionEmoji | nullreason?: string) : Promise<this> (
Sets the default reaction emoji for this channel
setDefaultSortOrderdefaultSortOrder: SortOrderType | nullreason?: string) : Promise<this> (
Sets the default sort order mode used to order posts
setDefaultThreadRateLimitPerUser) : Promise<this> (
Sets the default rate limit per user (slowmode) for new threads in this channel
Sets whether this channel is flagged as NSFW.
Sets the rate limit per user (slowmode) for this channel.