Skip to main content

DiscordChannel

@discordeno/bot


Documentation / @discordeno/bot / DiscordChannel

Interface: DiscordChannel

Defined in: packages/types/dist/types/discord/channel.d.ts:7

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

Properties

application_id?

optional application_id: string

Defined in: packages/types/dist/types/discord/channel.d.ts:60

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


applied_tags?

optional applied_tags: string[]

Defined in: packages/types/dist/types/discord/channel.d.ts:120

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


available_tags?

optional available_tags: DiscordForumTag[]

Defined in: packages/types/dist/types/discord/channel.d.ts:118

The set of tags that can be used in a GUILD_FORUM or GUILD_MEDIA channel


bitrate?

optional bitrate: number

Defined in: packages/types/dist/types/discord/channel.d.ts:42

The bitrate (in bits) of the voice or stage channel


default_auto_archive_duration?

optional default_auto_archive_duration: number

Defined in: packages/types/dist/types/discord/channel.d.ts:103

Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity.

Remarks

Can be set to: 60, 1440, 4320, 10080


default_forum_layout?

optional default_forum_layout: ForumLayout

Defined in: packages/types/dist/types/discord/channel.d.ts:133

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


default_reaction_emoji?

optional default_reaction_emoji: null | DiscordDefaultReactionEmoji

Defined in: packages/types/dist/types/discord/channel.d.ts:122

the emoji to show in the add reaction button on a thread in a GUILD_FORUM or GUILD_MEDIA channel


default_sort_order?

optional default_sort_order: null | SortOrderTypes

Defined in: packages/types/dist/types/discord/channel.d.ts:131

the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin


default_thread_rate_limit_per_user?

optional default_thread_rate_limit_per_user: number

Defined in: packages/types/dist/types/discord/channel.d.ts:129

The initial rate_limit_per_user to set on newly created threads in a channel.

Remarks

This field is copied to the thread at creation time and does not live update.


flags?

optional flags: ChannelFlags

Defined in: packages/types/dist/types/discord/channel.d.ts:114

The flags of the channel


guild_id?

optional guild_id: string

Defined in: packages/types/dist/types/discord/channel.d.ts:18

The id of the guild

Remarks

May be missing for some channel object received over gateway guild dispatches


icon?

optional icon: string

Defined in: packages/types/dist/types/discord/channel.d.ts:56

icon hash of the group DM


id

id: string

Defined in: packages/types/dist/types/discord/channel.d.ts:9

The id of the channel


last_message_id?

optional last_message_id: null | string

Defined in: packages/types/dist/types/discord/channel.d.ts:40

The id of the last message sent in this channel (may not point to an existing or valid message or thread)


last_pin_timestamp?

optional last_pin_timestamp: null | string

Defined in: packages/types/dist/types/discord/channel.d.ts:78

When the last pinned message was pinned.

Remarks

This may be null in events such as GUILD_CREATE when a message is not pinned.


managed?

optional managed: boolean

Defined in: packages/types/dist/types/discord/channel.d.ts:62

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


member?

optional member: DiscordThreadMember

Defined in: packages/types/dist/types/discord/channel.d.ts:96

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


member_count?

optional member_count: number

Defined in: packages/types/dist/types/discord/channel.d.ts:92

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


message_count?

optional message_count: number

Defined in: packages/types/dist/types/discord/channel.d.ts:90

An approximate count of messages in a thread, does not include deleted messages or the initial message

Remarks

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


name?

optional name: string

Defined in: packages/types/dist/types/discord/channel.d.ts:29

The name of the channel (1-100 characters)


newly_created?

optional newly_created: boolean

Defined in: packages/types/dist/types/discord/channel.d.ts:140

When a thread is created this will be true on that channel payload for the thread.

Remarks

This will only exists on Thread Create gateway events.


nsfw?

optional nsfw: boolean

Defined in: packages/types/dist/types/discord/channel.d.ts:38

Whether the channel is nsfw


owner_id?

optional owner_id: string

Defined in: packages/types/dist/types/discord/channel.d.ts:58

Id of the creator of the group DM or the thread


parent_id?

optional parent_id: null | string

Defined in: packages/types/dist/types/discord/channel.d.ts:71

Id of the parent channel.

Remarks

For a guild channel this will reference a category ID, each category can contain up to 50 channels.

For threads this will reference the text channel the thread was created in.


permission_overwrites?

optional permission_overwrites: DiscordOverwrite[]

Defined in: packages/types/dist/types/discord/channel.d.ts:27

Explicit permission overwrites for members and roles


permissions?

optional permissions: string

Defined in: packages/types/dist/types/discord/channel.d.ts:112

Computed permissions for the invoking user in the channel.

Remarks

The computed permissions include channel overwrites but does not include implicit permissions, those need to be checked separatly.

Only presented when part of resolved data received from a slash command interaction.


position?

optional position: number

Defined in: packages/types/dist/types/discord/channel.d.ts:25

Sorting position of the channel

Remarks

Channels with the same position are sorted by id


rate_limit_per_user?

optional rate_limit_per_user: number

Defined in: packages/types/dist/types/discord/channel.d.ts:52

Amount of seconds a user has to wait before sending another message (0-21600)

Remarks

Bots, as well as users with the permission manage_messages or manage_channel, are unaffected rate_limit_per_user also applies to thread creation. Users can send one message and create one thread during each rate_limit_per_user interval.


recipients?

optional recipients: DiscordUser[]

Defined in: packages/types/dist/types/discord/channel.d.ts:54

the recipients of the DM


rtc_region?

optional rtc_region: null | string

Defined in: packages/types/dist/types/discord/channel.d.ts:80

Voice region id for the voice or stage channel, automatic when set to null


thread_metadata?

optional thread_metadata: DiscordThreadMetadata

Defined in: packages/types/dist/types/discord/channel.d.ts:94

Thread-specific fields not needed by other channels


topic?

optional topic: null | string

Defined in: packages/types/dist/types/discord/channel.d.ts:36

The channel topic

Remarks

The limit is max of 4096 characters for GUILD_FORUM channels and a max of 1024 characters for all others channel types


total_message_sent?

optional total_message_sent: number

Defined in: packages/types/dist/types/discord/channel.d.ts:116

number of messages ever sent in a thread, it's similar to message_count on message creation, but will not decrement the number when a message is deleted


type

type: ChannelTypes

Defined in: packages/types/dist/types/discord/channel.d.ts:11

The type of channel


user_limit?

optional user_limit: number

Defined in: packages/types/dist/types/discord/channel.d.ts:44

The user limit of the voice or stage channel


video_quality_mode?

optional video_quality_mode: VideoQualityModes

Defined in: packages/types/dist/types/discord/channel.d.ts:82

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