Skip to main content

APIChannel

Index

Properties

optionalapplication_id

application_id?: string

Application id of the group DM creator if it is bot-created

optionalavailable_tags

available_tags?: string

The IDs of the set of tags that have been applied to a thread in a GuildForum or a GuildMedia channel

optionalbitrate

bitrate?: number

The bitrate (in bits) of the voice channel

optionaldefault_auto_archive_duration

default_auto_archive_duration?: ThreadAutoArchiveDuration

Default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080

optionaldefault_forum_layout

default_forum_layout?: ForumLayoutType

the default forum layout view used to display posts in GUILD_FORUM channels. Defaults to 0, which indicates a layout view has not been set by a channel admin

optionaldefault_reaction_emoji

default_reaction_emoji?: APIDefaultReactionEmoji

The emoji to show in the add reaction button on a thread in a GuildForum or a GuildMedia channel

optionaldefault_sort_order

default_sort_order?: null | SortOrderType

The default sort order type used to order posts in GuuldForum and GuildMedia channels. Defaults to null, which indicates a preferred sort order hasn’t been set by a channel admin

@see

optionaldefault_thread_rate_limit_per_user

default_thread_rate_limit_per_user?: number

The initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update.

optionalflags

flags?: ChannelFlags

optionalguild_id

guild_id?: string

The ID of the guild (may be missing for some channel objects received over gateway guild dispatches)

optionalicon

icon?: string

id

id: string

The ID of this channel

optionallast_message_id

last_message_id?: string

The ID of the last message sent in this channel (or thread for GuildForum or GuildMedia channels) (may not point to an existing or valid message or thread)

optionallast_pin_timestamp

last_pin_timestamp?: string

When the last pinned message was pinned. This may be null in events such as GuildCreate when a message is not pinned.

optionalmanaged

managed?: boolean

For group DM channels: whether the channel is managed by an application via the gdm.join OAuth2 scope

optionalmember

Thread member object for the current user, if they have joined the thread, only included on certain API endpoints

optionalmember_count

member_count?: number

An approximate count of users in a thread, stops counting at 50

optionalmessage_count

message_count?: number

Number of messages (not including the initial message or deleted messages) in a thread

For threads created before July 1, 2022, the message count is inaccurate when it’s greater than 50

optionalname

name?: string

The name of the channel (1-100 characters)

optionalnsfw

nsfw?: boolean

Whether the channel is NSFW

optionalowner_id

owner_id?: string

ID of the creator of the group DM or thread

optionalparent_id

parent_id?: string

For guild channels: ID of the parent category for a channel (each parent category can contain up to 50 channels)

For threads: ID of the text channel this thread was created

permission_overwrites

permission_overwrites: APIChannelOverwrite[]

Explicit permission overwrites for members and roles

@see

optionalpermissions

permissions?: string

Computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction. This does not include implicit permissions, which may need to be checked separately

optionalposition

position?: number

Sorting position of the channel

optionalrate_limit_per_user

rate_limit_per_user?: number

Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission ManageMessages or ManageChannel, are unaffected

This also applies to thread creation. Users can send one message and create one thread during each interval

optionalrecipients

recipients?: APIUser

The recipients of the DM

optionalrtc_region

rtc_region?: null | string

Voice region ID for the voice channel, automatic when set to null

thread_metadata

thread_metadata: APIThreadMetadata[]

Thread-specific fields not needed by other channels

optionaltopic

topic?: string

The channel topic (0-4096 characters for GuildForum and GuildMedia channels, 0-1024 characters for all others)

optionaltotal_message_sent

total_message_sent?: number

Number of messages ever sent in a thread

Similar to message_count on message creation, but will not decrement the number when a message is deleted

type

optionaluser_limit

user_limit?: number

The user limit of the voice channel

optionalvideo_quality_mode

video_quality_mode?: VideoQualityMode

The camera video quality mode of the voice channel, 1 when not present

@see