GuildForumChannel
Represents a guild forum channel.
Extends
GuildThreadOnlyChannel
<ChannelType.GuildForum
,IsPartial
>
Type Parameters
Type Parameter | Default type |
---|---|
IsPartial extends boolean | false |
Constructors
new GuildForumChannel()
new GuildForumChannel<
IsPartial
>(client
,rawDataOrId
):GuildForumChannel
<IsPartial
>
Parameters
Parameter | Type |
---|---|
client | Client |
rawDataOrId | IsPartial extends true ? string : APIGuildForumChannel |
Returns
GuildForumChannel
<IsPartial
>
Inherited from
GuildThreadOnlyChannel
.constructor
Properties
Property | Modifier | Type | Description | Overrides | Inherited from |
---|---|---|---|---|---|
client | public | Client | - | - | GuildThreadOnlyChannel .client |
id | readonly | string | The id of the channel. | - | GuildThreadOnlyChannel .id |
rawData | public | null | APIGuildForumChannel | The raw data of the channel. | GuildThreadOnlyChannel .rawData | - |
Accessors
availableTags
get
availableTags():IfPartial
<IsPartial
,APIGuildForumTag
[]>
The available tags to set on posts in the channel.
Returns
IfPartial
<IsPartial
, APIGuildForumTag
[]>
Inherited from
GuildThreadOnlyChannel
.availableTags
defaultAutoArchiveDuration
get
defaultAutoArchiveDuration():IfPartial
<IsPartial
,null
|number
>
The default auto archive duration of the channel.
Returns
IfPartial
<IsPartial
, null
| number
>
Inherited from
GuildThreadOnlyChannel
.defaultAutoArchiveDuration
defaultForumLayout
get
defaultForumLayout():IfPartial
<IsPartial
,null
|ForumLayoutType
>
The default forum layout of the channel.
Returns
IfPartial
<IsPartial
, null
| ForumLayoutType
>
defaultReactionEmoji
get
defaultReactionEmoji():IfPartial
<IsPartial
,null
|APIGuildForumDefaultReactionEmoji
>
The default reaction emoji for the channel.
Returns
IfPartial
<IsPartial
, null
| APIGuildForumDefaultReactionEmoji
>
Inherited from
GuildThreadOnlyChannel
.defaultReactionEmoji
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
>
Inherited from
GuildThreadOnlyChannel
.defaultSortOrder
defaultThreadRateLimitPerUser
get
defaultThreadRateLimitPerUser():IfPartial
<IsPartial
,null
|number
>
The default thread rate limit per user for the channel.
Returns
IfPartial
<IsPartial
, null
| number
>
Inherited from
GuildThreadOnlyChannel
.defaultThreadRateLimitPerUser
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
guild
The guild this channel is in
Returns
IfPartial
<IsPartial
, Guild
<true
>>
Inherited from
guildId
get
guildId():IfPartial
<IsPartial
,string
>
The ID of the guild this channel is in
Returns
IfPartial
<IsPartial
, string
>
Inherited from
GuildThreadOnlyChannel
.guildId
name
get
name():IfPartial
<IsPartial
,string
>
The name of the channel.
Returns
IfPartial
<IsPartial
, string
>
Inherited from
nsfw
get
nsfw():IfPartial
<IsPartial
,boolean
>
Whether the channel is marked as nsfw.
Returns
IfPartial
<IsPartial
, boolean
>
Inherited from
parentId
get
parentId():IfPartial
<IsPartial
,null
|string
>
The ID of the parent category for the channel.
Returns
IfPartial
<IsPartial
, null
| string
>
Inherited from
GuildThreadOnlyChannel
.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
GuildThreadOnlyChannel
.partial
position
get
position():IfPartial
<IsPartial
,number
>
The position of the channel in the channel list.
Returns
IfPartial
<IsPartial
, number
>
Inherited from
GuildThreadOnlyChannel
.position
topic
get
topic():IfPartial
<IsPartial
,null
|string
>
The topic of the channel.
Returns
IfPartial
<IsPartial
, null
| string
>
Inherited from
type
get
type():IfPartial
<IsPartial
,Type
>
The type of the channel.
Returns
IfPartial
<IsPartial
, Type
>
Inherited from
Methods
createInvite()
createInvite(
options
?):Promise
<APIExtendedInvite
>
Create an invite for the channel
Parameters
Parameter | Type |
---|---|
options ? | RESTPostAPIChannelInviteJSONBody |
Returns
Promise
<APIExtendedInvite
>
Inherited from
GuildThreadOnlyChannel
.createInvite
fetch()
fetch():
Promise
<void
>
Fetches the channel from the API.
Returns
Promise
<void
>
The channel data.
Inherited from
getInvites()
getInvites():
Promise
<RESTGetAPIGuildInvitesResult
>
Get the invites for the channel
Returns
Promise
<RESTGetAPIGuildInvitesResult
>
Inherited from
GuildThreadOnlyChannel
.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
>
Inherited from
sendToPost()
sendToPost(
message
,postId
):Promise
<void
>
Send a message to a post in the channel
Parameters
Parameter | Type |
---|---|
message | MessagePayload |
postId | string |
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.
Inherited from
GuildThreadOnlyChannel
.sendToPost
setData()
protected
setData(data
):void
Parameters
Parameter | Type |
---|---|
data | APIGuildForumChannel |
Returns
void
Inherited from
GuildThreadOnlyChannel
.setData
setField()
protected
setField(field
,value
):void
Parameters
Parameter | Type |
---|---|
field | "id" | "name" | "rate_limit_per_user" | "last_message_id" | "last_pin_timestamp" | "type" | "flags" | "guild_id" | "permission_overwrites" | "position" | "parent_id" | "nsfw" | "default_forum_layout" | "topic" | "default_auto_archive_duration" | "available_tags" | "default_thread_rate_limit_per_user" | "default_reaction_emoji" | "default_sort_order" |
value | unknown |
Returns
void
Inherited from
GuildThreadOnlyChannel
.setField
setName()
setName(
name
):Promise
<void
>
Set the name of the channel
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The new name of the channel |
Returns
Promise
<void
>
Inherited from
GuildThreadOnlyChannel
.setName
setNsfw()
setNsfw(
nsfw
):Promise
<void
>
Set whether the channel is nsfw
Parameters
Parameter | Type | Description |
---|---|---|
nsfw | boolean | The new nsfw status of the channel |
Returns
Promise
<void
>
Inherited from
GuildThreadOnlyChannel
.setNsfw
setParent()
setParent(
parent
):Promise
<void
>
Set the parent ID of the channel
Parameters
Parameter | Type | Description |
---|---|---|
parent | string | GuildCategoryChannel <false > | The new category channel or ID to set |
Returns
Promise
<void
>
Inherited from
GuildThreadOnlyChannel
.setParent
setPosition()
setPosition(
position
):Promise
<void
>
Set the position of the channel
Parameters
Parameter | Type | Description |
---|---|---|
position | number | The new position of the channel |
Returns
Promise
<void
>
Inherited from
GuildThreadOnlyChannel
.setPosition
triggerTyping()
triggerTyping():
Promise
<void
>
Trigger a typing indicator in the channel (this will expire after 10 seconds)
Returns
Promise
<void
>