class ThreadOnlyChannel

extends

TextBasedChannelMixin(GuildChannel, true, [ 'send', 'lastMessage', 'lastPinAt', 'bulkDelete', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'createMessageComponentCollector', 'awaitMessageComponent',])
abstract
export abstract class ThreadOnlyChannel extends TextBasedChannelMixin(GuildChannel, true, [ 'send', 'lastMessage', 'lastPinAt', 'bulkDelete', 'sendTyping', 'createMessageCollector', 'awaitMessages', 'createMessageComponentCollector', 'awaitMessageComponent',])

Represents symbols utilised by thread-only channels.

availableTags : GuildForumTag[]

The set of tags that can be used in this channel.

defaultAutoArchiveDuration : ThreadAutoArchiveDuration | null

The default auto archive duration for newly created threads in this channel.

defaultReactionEmoji : DefaultReactionEmoji | null

The emoji to show in the add reaction button on a thread in a guild forum channel

defaultSortOrder : SortOrderType | null

The default sort order mode used to order posts

defaultThreadRateLimitPerUser : number | null

The initial rate limit per user (slowmode) to set on newly created threads in a channel.

nsfw : boolean

If this channel is considered NSFW.

rateLimitPerUser : number | null

The rate limit per user (slowmode) for this channel.

A manager of the threads belonging to this channel

topic : string | null

The topic of this channel.

The type of the channel

createInvite() : Promise<Invite>

Creates an invite to this guild channel.

Examples:
// Create an invite to a channel
channel.createInvite()
  .then(invite => console.log(`Created an invite with a code of ${invite.code}`))
  .catch(console.error);

createWebhook() : Promise<Webhook>

Creates a webhook for the channel.

Examples:
// 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 *

fetchInvites(
cache?: boolean
) : Promise<Collection<string, Invite>>

Fetches a collection of invites to this guild channel. Resolves with a collection mapping invites by their codes.

fetchWebhooks() : Promise<Collection<Snowflake, Webhook>>

Fetches all webhooks for the channel.

Examples:
// Fetch webhooks
channel.fetchWebhooks()
  .then(hooks => console.log(`This channel has ${hooks.size} hooks`))
  .catch(console.error);

setAvailableTags(
availableTags: GuildForumTagData[]
reason?: string
) : Promise<this>

Sets the available tags for this forum channel

setDefaultAutoArchiveDuration(
defaultAutoArchiveDuration: ThreadAutoArchiveDuration
reason?: string
) : Promise<this>

Sets the default auto archive duration for all newly created threads in this channel.

setDefaultReactionEmoji(
defaultReactionEmoji: DefaultReactionEmoji | null
reason?: string
) : Promise<this>

Sets the default reaction emoji for this channel

setDefaultSortOrder(
defaultSortOrder: SortOrderType | null
reason?: string
) : Promise<this>

Sets the default sort order mode used to order posts

setDefaultThreadRateLimitPerUser(
defaultThreadRateLimitPerUser: number
reason?: string
) : Promise<this>

Sets the default rate limit per user (slowmode) for new threads in this channel

setNSFW(
nsfw?: boolean
reason?: string
) : Promise<this>

Sets whether this channel is flagged as NSFW.

setRateLimitPerUser(
rateLimitPerUser: number
reason?: string
) : Promise<this>

Sets the rate limit per user (slowmode) for this channel.

setTopic(
topic: string | null
reason?: string
) : Promise<this>

Sets a new topic for the guild channel.

Examples:
// Set a new channel topic
channel.setTopic('needs more rate limiting')
  .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))
  .catch(console.error);