channels

get

Get a channel

await discord.channels.get('CHANNEL_ID')

list

Get a list of channels in a guild

await discord.channels.list('GUILD_ID')

create

fieldvaluedescription

name

string

channel name (1-100 characters)

type?

topic?

?string

channel topic (0-1024 characters)

bitrate?

?number

the bitrate (in bits) of the voice or stage channel; min 8000

user_limit?

?number

the user limit of the voice channel

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 manage_messages or manage_channel, are unaffected

position?

?number

sorting position of the channel

permission_overwrites?

Partial<Overwrite>[]

the channel's permission overwrites

parent_id?

?channel id

id of the parent category for a channel

nsfw?

?boolean

whether the channel is nsfw

rtc_region?

?string

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

video_quality_mode?

?number

the camera video quality mode of the voice channel

default_auto_archive_duration?

?number

the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity

default_reaction_emoji?

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

available_tags?

set of tags that can be used in a GUILD_FORUM channel

default_sort_order?

the default sort order type used to order posts in GUILD_FORUM channels

await discord.channels.create('GUILD_ID', channel /* see above */)

modify

Group DM

fieldvaluedescription

name?

string

1-100 character channel name

icon?

string

base64 encoded icon

Guild channel

fieldvaluedescription

name?

string

1-100 character channel name

type?

the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature

position?

?integer

the position of the channel in the left-hand listing

topic?

?string

0-1024 character channel topic (0-4096 characters for GUILD_FORUM channels)

nsfw?

?boolean

whether the channel is nsfw

rate_limit_per_user?

?integer

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

bitrate?

?integer

the bitrate (in bits) of the voice or stage channel; min 8000

user_limit?

?integer

the user limit of the voice or stage channel, max 99 for voice channels and 10,000 for stage channels (0 refers to no limit)

permission_overwrites?

?Partial<Overwrite>[]

channel or category-specific permissions

parent_id?

?Channel ID

id of the new parent category for a channel

rtc_region?

?string

channel voice region id, automatic when set to null

video_quality_mode?

the camera video quality mode of the voice channel

default_auto_archive_duration?

?integer

the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity

flags?

integer

channel flags combined as a bitfield. Currently only REQUIRE_TAG (1 << 4) is supported.

available_tags?

the set of tags that can be used in a GUILD_FORUM channel; limited to 20

default_reaction_emoji?

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

default_thread_rate_limit_per_user?

integer

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.

default_sort_order?

the default sort order type used to order posts in GUILD_FORUM channels

default_forum_layout

the default forum layout type used to display posts in GUILD_FORUM channels

thread

fieldvaluedescription

name?

string

1-100 character channel name

archived?

boolean

whether the thread is archived

auto_archive_duration?

integer

the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080

locked?

boolean

whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it

invitable?

boolean

whether non-moderators can add other non-moderators to a thread; only available on private threads

rate_limit_per_user?

?integer

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

flags?

integer

channel flags combined as a bitfield; PINNED can only be set for threads in forum channels

applied_tags?

Snowflake[]

the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel; limited to 5

Modify a channel

await discord.channels.modify('CHANNEL_ID', channel /* see above */)

delete

Delete a channel

await discord.channels.delete('CHANNEL_ID')

modifyPositions

fieldvaluedescription

id

Snowflake

channel id

position?

?integer

sorting position of the channel

lock_permissions?

?boolean

syncs the permission overwrites with the new parent, if moving to a new category

parent_id?

?Snowflake

the new parent ID for the channel that is moved

await discord.channnels.modifyPositions('GUILD_ID', channels[] /* see above */)

types

VideoQualityMode

modevaluedescription

AUTO

1

Discord chooses the quality for optimal performance

FULL

2

720p

DefaultReaction

An object that specifies the emoji to use as the default way to react to a forum post. Exactly one of emoji_id and emoji_name must be set.

fieldtypedescription

emoji_id

?Snowflake

the id of a guild's custom emoji

emoji_name

?string

the unicode character of the emoji

ForumTag

fieldtypedescription

id

Snowflake ID

the id of the tag

name

string

the name of the tag (0-20 characters)

moderated

boolean

whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission

emoji_id

?Snowflake

the id of a guild's custom emoji

emoji_name

?string

the unicode character of the emoji

ForumLayoutType

flagvaluedescription

NOT_SET

0

No default has been set for forum channel

LIST_VIEW

1

Display posts as a list

GALLERY_VIEW

2

Display posts as a collection of tiles

SortOrderType

typevaluedescription

LATEST_ACTIVITY

0

Sort forum posts by activity

CREATION_DATE

1

Sort forum posts by creation time (from most recent to oldest)

ChannelType

typevaluedescription

GUILD_TEXT

0

a text channel within a server

DM

1

a direct message between users

GUILD_VOICE

2

a voice channel within a server

GROUP_DM

3

a direct message between multiple users

GUILD_CATEGORY

4

an organizational category that contains up to 50 channels

GUILD_ANNOUNCEMENT

5

a channel that users can follow and crosspost into their own server (formerly news channels)

ANNOUNCEMENT_THREAD

10

a temporary sub-channel within a GUILD_ANNOUNCEMENT channel

PUBLIC_THREAD

11

a temporary sub-channel within a GUILD_TEXT or GUILD_FORUM channel

PRIVATE_THREAD

12

a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADSpermission

GUILD_STAGE_VOICE

13

GUILD_DIRECTORY

14

the channel in a hub containing the listed servers

GUILD_FORUM

15

Channel that can only contain threads

Overwrite

fieldtypedescription

id

Snowflake

role or user id

type

integer

either 0 (role) or 1 (member)

allow

string

permission bit set

deny

string

permission bit set

Last updated