export abstract class ThreadOnlyChannel extends GuildChannelRepresents symbols utilized by thread-only channels.
appPermissions : Readonly<PermissionsBitField> | null
The computed permissions of the application in this channel, including overwrites. This is only present on channels received through an interaction's resolved data, and only when the application's bot user is in the guild.
Inherited from: BaseChannel
availableTags : GuildForumTag[]
The set of tags that can be used in this channel.
readonlycreatedTimestamp : number
The timestamp the channel was created at
Inherited from: GuildChannel
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
The initial rate limit per user (slowmode) to set on newly created threads in a channel.
readonlydeletable : boolean
Whether the channel is deletable by the client user
Inherited from: GuildChannel
flags : Readonly<ChannelFlagsBitField>
The flags that are applied to the channel. This is only null in a PartialGroupDMChannel. In all other cases, it is not null.
Inherited from: GuildChannel
readonlymanageable : boolean
Whether the channel is manageable by the client user
Inherited from: GuildChannel
readonlymembers : Collection<Snowflake, GuildMember>
A 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.
Inherited from: GuildChannel
nsfw : boolean
If this channel is considered NSFW.
readonlyparent : CategoryChannel | null
The category parent of this channel
Inherited from: GuildChannel
The id of the category parent of this channel
Inherited from: GuildChannel
Whether this Channel is a partial This is always false outside of DM channels.
Inherited from: BaseChannel
permissionOverwrites : PermissionOverwriteManager
A manager of permission overwrites that belong to this channel
Inherited from: GuildChannel
permissions : Readonly<PermissionsBitField> | null
The computed permissions of the user who invoked the interaction in this channel, including overwrites. This is only present on channels received through an interaction's resolved data.
Inherited from: BaseChannel
If the permissionOverwrites match the parent channel, null if no parent
Inherited from: GuildChannel
threads : GuildForumThreadManager
A manager of the threads belonging to this channel
The type of the channel
readonlyviewable : boolean
Whether the channel is viewable by the client user
Inherited from: GuildChannel
clone(options?: GuildChannelCloneOptions) : Promise<this>
Clones this channel.
Inherited from: GuildChannel
createInvite(options?: InviteCreateOptions = {}) : Promise<GuildInvite>
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); createWebhook(options?: 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 *
Deletes this channel.
// Delete the channel
channel.delete('making room for new channels')
.then(console.log)
.catch(console.error);Inherited from: GuildChannel
edit(options: GuildChannelEditOptions) : Promise<this>
Edits the channel.
// Edit a channel
channel.edit({ name: 'new-channel' })
.then(console.log)
.catch(console.error);Inherited from: GuildChannel
equals(channel: GuildChannel) : boolean
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.
Inherited from: GuildChannel
fetchInvites(cache?: boolean = true) : Promise<Collection<string, GuildInvite>>
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.
// Fetch webhooks
channel.fetchWebhooks()
.then(hooks => console.log(`This channel has ${hooks.size} hooks`))
.catch(console.error);isDMBased() : this is DMChannel | PartialDMChannel | PartialGroupDMChannel
Indicates whether this channel is DM-based (either a DMChannel or a PartialGroupDMChannel).
Inherited from: BaseChannel
isSendable() : this is SendableChannels
Indicates whether this channel is sendable.
Inherited from: BaseChannel
isTextBased() : this is GuildBasedChannel & TextBasedChannel
Indicates whether this channel is text-based.
Inherited from: GuildChannel
isThread() : this is AnyThreadChannel
Indicates whether this channel is a ThreadChannel.
Inherited from: BaseChannel
isThreadOnly() : this is ThreadOnlyChannel
Indicates whether this channel is thread-only.
Inherited from: BaseChannel
isVoiceBased() : this is VoiceBasedChannel
Indicates whether this channel is voice-based.
Inherited from: BaseChannel
lockPermissions() : Promise<this>
Locks in the permission overwrites from the parent channel.
Inherited from: GuildChannel
permissionsFor(memberOrRole: GuildMember | RolecheckAdmin?: boolean = true) : Readonly<PermissionsBitField>
Gets the overall set of permissions for a member or role in this channel, taking into account channel overwrites.
setAvailableTags(availableTags: readonly GuildForumTagData[]reason?: string) : Promise<this>
Sets the available tags for this forum channel
setDefaultAutoArchiveDuration(defaultAutoArchiveDuration: ThreadAutoArchiveDurationreason?: string) : Promise<this>
Sets the default auto archive duration for all newly created threads in this channel.
setDefaultReactionEmoji(defaultReactionEmoji: DefaultReactionEmoji | nullreason?: string) : Promise<this>
Sets the default reaction emoji for this channel
setDefaultSortOrder(defaultSortOrder: 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 a new name for the guild channel.
// Set a new channel name
channel.setName('not_general')
.then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))
.catch(console.error);Inherited from: GuildChannel
Sets whether this channel is flagged as NSFW.
setParent(channel: CategoryChannelResolvable | nulloptions?: SetParentOptions = {}) : Promise<this>
Sets the parent of this channel.
// Add a parent to a channel
message.channel.setParent('355908108431917066')
.then(channel => console.log(`New parent of ${channel.name}: ${channel.parent.name}`))
.catch(console.error);// Move a channel and sync its permissions with the parent
message.channel.setParent('355908108431917066', { lockPermissions: true })
.then(channel => console.log(`Moved ${message.channel.name} to ${channel.parent.name}`))
.catch(console.error);Inherited from: GuildChannel
setPosition(position: numberoptions?: SetChannelPositionOptions) : Promise<this>
Sets a new position for the guild channel.
// Set a new channel position
channel.setPosition(2)
.then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))
.catch(console.error);Inherited from: GuildChannel
Sets the rate limit per user (slowmode) for this channel.
Sets a new topic for the guild channel.
// 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);toString() : ChannelMention
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
// Logs: Hello from <#123456789012345678>!
console.log(`Hello from ${channel}!`);Inherited from: GuildChannel