Carbon
CoreClasses

GuildThreadOnlyChannel

Extends

Extended by

Type Parameters

Type ParameterDefault type
Type extends ChannelType.GuildForum | ChannelType.GuildMedia-
IsPartial extends booleanfalse

Constructors

new GuildThreadOnlyChannel()

new GuildThreadOnlyChannel<Type, IsPartial>(client, rawDataOrId): GuildThreadOnlyChannel<Type, IsPartial>

Parameters

ParameterType
clientClient
rawDataOrIdIsPartial extends true ? string : Extract<APIDMChannel, object> | Extract<APIGroupDMChannel, object> | Extract<APIGuildCategoryChannel, object> | Extract<APIGuildForumChannel, object> | Extract<APIGuildMediaChannel, object> | Extract<APIGuildStageVoiceChannel, object> | Extract<APIGuildVoiceChannel, object> | Extract<APINewsChannel, object> | Extract<APITextChannel, object> | Extract<APIThreadChannel, object>

Returns

GuildThreadOnlyChannel<Type, IsPartial>

Inherited from

BaseGuildChannel.constructor

Properties

PropertyModifierTypeDescriptionOverridesInherited from
clientpublicClient--BaseGuildChannel.client
idreadonlystringThe id of the channel.-BaseGuildChannel.id
rawDatapublicnull | APIThreadOnlyChannel<Type>The raw data of the channel.BaseGuildChannel.rawData-

Accessors

availableTags

get availableTags(): IfPartial<IsPartial, APIGuildForumTag[]>

The available tags to set on posts in the channel.

Returns

IfPartial<IsPartial, APIGuildForumTag[]>


defaultAutoArchiveDuration

get defaultAutoArchiveDuration(): IfPartial<IsPartial, null | number>

The default auto archive duration of the channel.

Returns

IfPartial<IsPartial, null | number>


defaultReactionEmoji

get defaultReactionEmoji(): IfPartial<IsPartial, null | APIGuildForumDefaultReactionEmoji>

The default reaction emoji for the channel.

Returns

IfPartial<IsPartial, null | APIGuildForumDefaultReactionEmoji>


defaultSortOrder

get defaultSortOrder(): IfPartial<IsPartial, null | SortOrderType>

The default sort order for the channel, by latest activity or by creation date.

Returns

IfPartial<IsPartial, null | SortOrderType>


defaultThreadRateLimitPerUser

get defaultThreadRateLimitPerUser(): IfPartial<IsPartial, null | number>

The default thread rate limit per user for the channel.

Returns

IfPartial<IsPartial, null | number>


flags

get flags(): IfPartial<IsPartial, undefined | ChannelFlags>

The flags of the channel in a bitfield.

See

https://discord.com/developers/docs/resources/channel#channel-object-channel-flags

Returns

IfPartial<IsPartial, undefined | ChannelFlags>

Inherited from

BaseGuildChannel.flags


guild

get guild(): IfPartial<IsPartial, Guild<true>>

The guild this channel is in

Returns

IfPartial<IsPartial, Guild<true>>

Inherited from

BaseGuildChannel.guild


guildId

get guildId(): IfPartial<IsPartial, string>

The ID of the guild this channel is in

Returns

IfPartial<IsPartial, string>

Inherited from

BaseGuildChannel.guildId


name

get name(): IfPartial<IsPartial, string>

The name of the channel.

Returns

IfPartial<IsPartial, string>

Inherited from

BaseGuildChannel.name


nsfw

get nsfw(): IfPartial<IsPartial, boolean>

Whether the channel is marked as nsfw.

Returns

IfPartial<IsPartial, boolean>

Inherited from

BaseGuildChannel.nsfw


parentId

get parentId(): IfPartial<IsPartial, null | string>

The ID of the parent category for the channel.

Returns

IfPartial<IsPartial, null | string>

Inherited from

BaseGuildChannel.parentId


partial

get partial(): IsPartial

Whether the channel is a partial channel (meaning it does not have all the data). If this is true, you should use BaseChannel.fetch to get the full data of the channel.

Returns

IsPartial

Inherited from

BaseGuildChannel.partial


position

get position(): IfPartial<IsPartial, number>

The position of the channel in the channel list.

Returns

IfPartial<IsPartial, number>

Inherited from

BaseGuildChannel.position


topic

get topic(): IfPartial<IsPartial, null | string>

The topic of the channel.

Returns

IfPartial<IsPartial, null | string>


type

get type(): IfPartial<IsPartial, Type>

The type of the channel.

Returns

IfPartial<IsPartial, Type>

Inherited from

BaseGuildChannel.type

Methods

createInvite()

createInvite(options?): Promise<APIExtendedInvite>

Create an invite for the channel

Parameters

ParameterType
options?RESTPostAPIChannelInviteJSONBody

Returns

Promise<APIExtendedInvite>

Inherited from

BaseGuildChannel.createInvite


fetch()

fetch(): Promise<void>

Fetches the channel from the API.

Returns

Promise<void>

The channel data.

Inherited from

BaseGuildChannel.fetch


getInvites()

getInvites(): Promise<RESTGetAPIGuildInvitesResult>

Get the invites for the channel

Returns

Promise<RESTGetAPIGuildInvitesResult>

Inherited from

BaseGuildChannel.getInvites


send()

send(): Promise<void>

You cannot send a message directly to a forum or media channel, so this method throws an error. Use GuildThreadChannel.send instead, or the alias GuildThreadOnlyChannel.sendToPost instead, to send a message to the channel's posts.

Returns

Promise<void>

Overrides

BaseGuildChannel.send


sendToPost()

sendToPost(message, postId): Promise<void>

Send a message to a post in the channel

Parameters

ParameterType
messageMessagePayload
postIdstring

Returns

Promise<void>

Remarks

This is an alias for GuildThreadChannel.send that will fetch the channel, but if you already have the channel, you can use GuildThreadChannel.send instead.


setData()

protected setData(data): void

Parameters

ParameterType
dataExtract<APIDMChannel, object> | Extract<APIGroupDMChannel, object> | Extract<APIGuildCategoryChannel, object> | Extract<APIGuildForumChannel, object> | Extract<APIGuildMediaChannel, object> | Extract<APIGuildStageVoiceChannel, object> | Extract<APIGuildVoiceChannel, object> | Extract<APINewsChannel, object> | Extract<APITextChannel, object> | Extract<APIThreadChannel, object>

Returns

void

Inherited from

BaseGuildChannel.setData


setField()

protected setField(field, value): void

Parameters

ParameterType
fieldkeyof Extract<APIDMChannel, object> & keyof Extract<APIGroupDMChannel, object> & keyof Extract<APIGuildCategoryChannel, object> & keyof Extract<APIGuildForumChannel, object> & keyof Extract<APIGuildMediaChannel, object> & keyof Extract<APIGuildStageVoiceChannel, object> & keyof Extract<APIGuildVoiceChannel, object> & keyof Extract<APINewsChannel, object> & keyof Extract<APITextChannel, object> & keyof Extract<APIThreadChannel, object>
valueunknown

Returns

void

Inherited from

BaseGuildChannel.setField


setName()

setName(name): Promise<void>

Set the name of the channel

Parameters

ParameterTypeDescription
namestringThe new name of the channel

Returns

Promise<void>

Inherited from

BaseGuildChannel.setName


setNsfw()

setNsfw(nsfw): Promise<void>

Set whether the channel is nsfw

Parameters

ParameterTypeDescription
nsfwbooleanThe new nsfw status of the channel

Returns

Promise<void>

Inherited from

BaseGuildChannel.setNsfw


setParent()

setParent(parent): Promise<void>

Set the parent ID of the channel

Parameters

ParameterTypeDescription
parentstring | GuildCategoryChannel<false>The new category channel or ID to set

Returns

Promise<void>

Inherited from

BaseGuildChannel.setParent


setPosition()

setPosition(position): Promise<void>

Set the position of the channel

Parameters

ParameterTypeDescription
positionnumberThe new position of the channel

Returns

Promise<void>

Inherited from

BaseGuildChannel.setPosition


triggerTyping()

triggerTyping(): Promise<void>

Trigger a typing indicator in the channel (this will expire after 10 seconds)

Returns

Promise<void>

Inherited from

BaseGuildChannel.triggerTyping

On this page

Edit on GitHub