| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
dpp::channel Class Reference

A definition of a discord channel. There are one of these for every channel type except threads. Threads are special snowflakes. Get it? A Discord pun. Hahaha. .... I'll get my coat. More...

`#include <channel.h>`

Inheritance diagram for dpp::channel:
[legend]
Collaboration diagram for dpp::channel:
[legend]

## Public Member Functions

| channel ()
virtual | ~channel ()
channel & | add_flag (const channel_flags flag)
| Add (bitwise OR) a flag to this channel object.
channel & | add_permission_overwrite (const snowflake target, const overwrite_type type, const uint64_t allowed_permissions, const uint64_t denied_permissions)
| Add permission overwrites for a user or role. If the channel already has permission overwrites for the passed target, the existing ones will be adjusted by the passed permissions.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
channel & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
constexpr double | get_creation_time () const noexcept
| Get the creation time of this object according to Discord.
forum_layout_type | get_default_forum_layout () const
| Get the default forum layout type used to display posts in forum channels.
std::string | get_icon_url (uint16_t size=0, const image_type format=i_png) const
| Get the channel's icon url (if its a group DM), otherwise returns an empty string.
std::map< snowflake, class guild_member * > | get_members ()
| Return a map of members on the channel, built from the guild's member list based on which members have the VIEW_CHANNEL permission. Does not return reliable information for voice channels, use dpp::channel::get_voice_members() instead for this.
std::string | get_mention () const
| Get the mention ping for the channel.
channel_type | get_type () const
| Get the channel type.
std::string | get_url () const
| Returns string of URL to channel.
permission | get_user_permissions (const class guild_member &member) const
| Get the overall permissions for a member in this channel, including channel overwrites, role permissions and admin privileges.
permission | get_user_permissions (const class user *user) const
| Get the overall permissions for a member in this channel, including channel overwrites, role permissions and admin privileges.
std::map< snowflake, voicestate > | get_voice_members ()
| Get a map of members in this channel, if it is a voice channel. The map is keyed by snowflake id of the user.
bool | is_category () const
| Returns true if the channel is a category.
bool | is_dm () const
| Returns true if the channel is a DM.
bool | is_download_options_hidden () const
| Returns true if embedded media download options are hidden in a media channel.
bool | is_forum () const
| Returns true if the channel is a forum.
bool | is_group_dm () const
| Returns true if the channel is a group DM channel.
bool | is_locked_permissions () const
| Returns true if the permissions are to be synced with the category it is in. Used only and set manually when using the reorder channels method.
bool | is_media_channel () const
| Returns true if the channel is a media channel.
bool | is_news_channel () const
| Returns true if the channel is an announcement channel.
bool | is_nsfw () const
| Returns true if the channel is NSFW gated.
bool | is_pinned_thread () const
| Returns true if channel is a pinned thread in forum.
bool | is_stage_channel () const
| Returns true if the channel is a stage channel.
bool | is_store_channel () const
| Returns true if the channel is a store channel.
bool | is_tag_required () const
| Returns true if a tag is required to be specified when creating a thread in a forum channel.
bool | is_text_channel () const
| Returns true if the channel is a text channel.
bool | is_video_720p () const
| Returns true if video quality is 720p.
bool | is_video_auto () const
| Returns true if video quality is auto.
bool | is_voice_channel () const
| Returns true if the channel is a voice channel.
constexpr bool | operator!= (const managed &other) const noexcept
| Comparison operator for comparing two managed objects by id.
constexpr bool | operator== (const managed &other) const noexcept
| Comparison operator for comparing two managed objects by id.
channel & | remove_flag (const channel_flags flag)
| Remove (bitwise NOT AND) a flag from this channel object.
channel & | remove_permission_overwrite (const snowflake target, const overwrite_type type)
| Remove channel specific permission overwrites of a user or role.
channel & | set_bitrate (const uint16_t bitrate)
| Set bitrate of this channel object.
channel & | set_default_forum_layout (forum_layout_type layout_type)
| Set the default forum layout type for the forum channel.
channel & | set_default_sort_order (default_forum_sort_order_t sort_order)
| Set the default forum sort order for the forum channel.
channel & | set_flags (const uint16_t flags)
| Set flags for this channel object.
channel & | set_guild_id (const snowflake guild_id)
| Set guild_id of this channel object.
channel & | set_lock_permissions (const bool is_lock_permissions)
| Set lock permissions property of this channel object Used only with the reorder channels method.
channel & | set_name (const std::string &name)
| Set name of this channel object.
channel & | set_nsfw (const bool is_nsfw)
| Set nsfw property of this channel object.
channel & | set_parent_id (const snowflake parent_id)
| Set parent_id of this channel object.
channel & | set_permission_overwrite (const snowflake target, const overwrite_type type, const uint64_t allowed_permissions, const uint64_t denied_permissions)
| Set permission overwrites for a user or role on this channel object. Old permission overwrites for the target will be overwritten.
channel & | set_position (const uint16_t position)
| Set position of this channel object.
channel & | set_rate_limit_per_user (const uint16_t rate_limit_per_user)
| Set rate_limit_per_user of this channel object.
channel & | set_topic (const std::string &topic)
| Set topic of this channel object.
channel & | set_type (channel_type type)
| Set type of this channel object.
channel & | set_user_limit (const uint8_t user_limit)
| Set user_limit of this channel object.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Static Public Member Functions

static std::string | get_mention (const snowflake &id)
| Create a mentionable channel.

## Public Attributes

std::vector< forum_tag > | available_tags
| A set of tags that can be used in a forum or media channel.
uint16_t | bitrate
| The bitrate (in kilobits) of the voice channel.
auto_archive_duration_t | default_auto_archive_duration
| Default duration, copied onto newly created threads. Used by the clients, not the API. Threads will stop showing in the channel list after the specified period of inactivity. Defaults to dpp::arc_1_day.
std::variant< std::monostate, snowflake, std::string > | default_reaction
| The emoji to show as the default reaction button on a thread in a forum or media channel. Contains either nothing, the id of a guild's custom emoji or the unicode character of the emoji.
default_forum_sort_order_t | default_sort_order
| The default sort order type used to order posts in forum and media channels.
uint16_t | default_thread_rate_limit_per_user
| 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.
uint16_t | flags
| Flags bitmap (dpp::channel_flags).
snowflake | guild_id
| Guild id of the guild that owns the channel.
utility::iconhash | icon
| Channel icon (for group DMs).
snowflake | id = {}
| Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata.
snowflake | last_message_id
| ID of last message to be sent to the channel.
time_t | last_pin_timestamp
| Timestamp of last pinned message.
std::string | name
| Channel name (1-100 characters).
snowflake | owner_id
| User ID of the creator for group DMs or threads.
snowflake | parent_id
| Parent ID (for guild channels: id of the parent category, for threads: id of the text channel this thread was created).
std::vector< permission_overwrite > | permission_overwrites
| Permission overwrites to apply to base permissions.
permission | permissions
| This is only filled when the channel is part of the resolved set sent within an interaction. Any other time it contains zero. When filled, it contains the calculated permission bitmask of the user issuing the command within this channel.
uint16_t | position
| Sorting position, lower number means higher up the list.
uint16_t | rate_limit_per_user
| 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.
std::vector< snowflake > | recipients
| DM recipients.
std::string | rtc_region
| Voice region if set for voice channel, otherwise empty string.
std::string | topic
| Channel topic (0-4096 characters for forum and media channels, 0-1024 characters for all others).
uint8_t | user_limit
| Maximum user limit for voice channels (0-99).

## Protected Member Functions

channel & | fill_from_json_impl (nlohmann::json *j)
virtual json | to_json_impl (bool with_id=false) const
| Build json for this channel object.

## Static Protected Attributes

static constexpr uint16_t | CHANNEL_TYPE_MASK = 0b0000000000001111

## Friends

struct | json_interface< channel >

## Detailed Description

A definition of a discord channel. There are one of these for every channel type except threads. Threads are special snowflakes. Get it? A Discord pun. Hahaha. .... I'll get my coat.

## Constructor & Destructor Documentation

## ◆ channel()

dpp::channel::channel | ( |  | ) |

Constructor

## ◆ ~channel()

virtual dpp::channel::~channel | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## ◆ add_flag()

channel & dpp::channel::add_flag | ( | const channel_flags | flag | ) |

Add (bitwise OR) a flag to this channel object.

Parameters

  flag | Flag bit to add from dpp::channel_flags

Returns
  Reference to self, so these method calls may be chained

## ◆ add_permission_overwrite()

channel & dpp::channel::add_permission_overwrite | ( | const snowflake | target,
|  | const overwrite_type | type,
|  | const uint64_t | allowed_permissions,
|  | const uint64_t | denied_permissions )

Add permission overwrites for a user or role. If the channel already has permission overwrites for the passed target, the existing ones will be adjusted by the passed permissions.

Parameters

  target | ID of the role or the member you want to adjust overwrites for
  type | type of overwrite
  allowed_permissions | bitmask of dpp::permissions you want to allow for this user/role in this channel. Note: You can use the dpp::permission class
  denied_permissions | bitmask of dpp::permissions you want to deny for this user/role in this channel. Note: You can use the dpp::permission class

Example:

channel.add_permission_overwrite(388499352297406481, dpp::ot_role, dpp::p_manage_channels | dpp::p_manage_messages, 0);
// Allows p_manage_channels and p_manage_messages permissions for the provided role.
dpp::channel::channel
channel()
dpp::ot_role
@ ot_role
Role.
Definition channel.h:198
dpp::p_manage_channels
@ p_manage_channels
Allows management and editing of channels.
Definition permissions.h:56
dpp::p_manage_messages
@ p_manage_messages
Allows for deletion of other users messages.
Definition permissions.h:102

Returns
  Reference to self, so these method calls may be chained

## ◆ build_json()

std::string dpp::json_interface< channel >::build_json | ( | bool | with_id = false | ) | const

inline inherited

Convert object to json string.

Parameters

  with_id | Whether to include the ID or not

Note
  Some fields are conditionally filled, do not rely on all fields being present

Returns
  std::string Json built from the structure

## ◆ fill_from_json()

channel & dpp::json_interface< channel >::fill_from_json | ( | nlohmann::json * | j | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::json object

Returns
  T& Reference to self for fluent calling

## ◆ fill_from_json_impl()

channel & dpp::channel::fill_from_json_impl | ( | nlohmann::json * | j | ) |

protected

Read class values from json object

Parameters

  j | A json object to read from

Returns
  A reference to self

## ◆ get_creation_time()

double dpp::managed::get_creation_time | ( |  | ) | const

inline constexpr noexcept inherited

Get the creation time of this object according to Discord.

Returns
  double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.

## ◆ get_default_forum_layout()

forum_layout_type dpp::channel::get_default_forum_layout | ( |  | ) | const

Get the default forum layout type used to display posts in forum channels.

Returns
  forum_layout_types Forum layout type

## ◆ get_icon_url()

std::string dpp::channel::get_icon_url | ( | uint16_t | size = 0,
|  | const image_type | format = i_png ) const

Get the channel's icon url (if its a group DM), otherwise returns an empty string.

Parameters

  size | The size of the icon in pixels. It can be any power of two between 16 and 4096, otherwise the default sized icon is returned.
  format | The format to use for the avatar. It can be one of i_webp, i_jpg or i_png.

Returns
  std::string icon url or an empty string, if required attributes are missing or an invalid format was passed

## ◆ get_members()

std::map< snowflake, class guild_member * > dpp::channel::get_members | ( |  | ) |

Return a map of members on the channel, built from the guild's member list based on which members have the VIEW_CHANNEL permission. Does not return reliable information for voice channels, use dpp::channel::get_voice_members() instead for this.

Returns
  A map of guild members keyed by user id.

Note
  If the guild this channel belongs to is not in the cache, the function will always return 0.

## ◆ get_mention() [1/2]

std::string dpp::channel::get_mention | ( |  | ) | const

Get the mention ping for the channel.

Returns
  std::string mention

## ◆ get_mention() [2/2]

std::string dpp::channel::get_mention | ( | const snowflake & | id | ) |

static

Create a mentionable channel.

Parameters

  id | The ID of the channel.

Returns
  std::string The formatted mention of the channel.

## ◆ get_type()

channel_type dpp::channel::get_type | ( |  | ) | const

Get the channel type.

Returns
  channel_type Channel type

## ◆ get_url()

std::string dpp::channel::get_url | ( |  | ) | const

Returns string of URL to channel.

Returns
  string of URL to channel

## ◆ get_user_permissions() [1/2]

permission dpp::channel::get_user_permissions | ( | const class guild_member & | member | ) | const

Get the overall permissions for a member in this channel, including channel overwrites, role permissions and admin privileges.

Parameters

  member | The member to resolve the permissions for

Returns
  permission Permission overwrites for the member. Made of bits in dpp::permissions.

Note
  Requires role cache to be enabled (it's enabled by default).
  This is an alias for guild::permission_overwrites and searches for the guild in the cache, so consider using guild::permission_overwrites if you already have the guild object.

## ◆ get_user_permissions() [2/2]

permission dpp::channel::get_user_permissions | ( | const class user * | user | ) | const

Get the overall permissions for a member in this channel, including channel overwrites, role permissions and admin privileges.

Parameters

  user | The user to resolve the permissions for

Returns
  permission Permission overwrites for the member. Made of bits in dpp::permissions.

Note
  Requires role cache to be enabled (it's enabled by default).
  This is an alias for guild::permission_overwrites and searches for the guild in the cache, so consider using guild::permission_overwrites if you already have the guild object.

Warning
  The method will search for the guild member in the cache by the users id. If the guild member is not in cache, the method will always return 0.

## ◆ get_voice_members()

std::map< snowflake, voicestate > dpp::channel::get_voice_members | ( |  | ) |

Get a map of members in this channel, if it is a voice channel. The map is keyed by snowflake id of the user.

Returns
  std::map<snowflake, voicestate> The voice members of the channel

## ◆ is_category()

bool dpp::channel::is_category | ( |  | ) | const

Returns true if the channel is a category.

Returns
  true if a category

## ◆ is_dm()

bool dpp::channel::is_dm | ( |  | ) | const

Returns true if the channel is a DM.

Returns
  true if is a DM

## ◆ is_download_options_hidden()

bool dpp::channel::is_download_options_hidden | ( |  | ) | const

Returns true if embedded media download options are hidden in a media channel.

Returns
  true, if embedded media download options are hidden in a media channel

## ◆ is_forum()

bool dpp::channel::is_forum | ( |  | ) | const

Returns true if the channel is a forum.

Returns
  true if a forum

## ◆ is_group_dm()

bool dpp::channel::is_group_dm | ( |  | ) | const

Returns true if the channel is a group DM channel.

Returns
  true if group DM

## ◆ is_locked_permissions()

bool dpp::channel::is_locked_permissions | ( |  | ) | const

Returns true if the permissions are to be synced with the category it is in. Used only and set manually when using the reorder channels method.

Returns
  true if keeping permissions

## ◆ is_media_channel()

bool dpp::channel::is_media_channel | ( |  | ) | const

Returns true if the channel is a media channel.

Returns
  true if media channel

## ◆ is_news_channel()

bool dpp::channel::is_news_channel | ( |  | ) | const

Returns true if the channel is an announcement channel.

Returns
  true if announcement channel

## ◆ is_nsfw()

bool dpp::channel::is_nsfw | ( |  | ) | const

Returns true if the channel is NSFW gated.

Returns
  true if NSFW

## ◆ is_pinned_thread()

bool dpp::channel::is_pinned_thread | ( |  | ) | const

Returns true if channel is a pinned thread in forum.

Returns
  true, if channel is a pinned thread in forum

## ◆ is_stage_channel()

bool dpp::channel::is_stage_channel | ( |  | ) | const

Returns true if the channel is a stage channel.

Returns
  true if stage channel

## ◆ is_store_channel()

bool dpp::channel::is_store_channel | ( |  | ) | const

Returns true if the channel is a store channel.

Deprecated
  store channels are deprecated by Discord

Returns
  true if store channel

## ◆ is_tag_required()

bool dpp::channel::is_tag_required | ( |  | ) | const

Returns true if a tag is required to be specified when creating a thread in a forum channel.

Returns
  true, if a tag is required to be specified when creating a thread in a forum channel

## ◆ is_text_channel()

bool dpp::channel::is_text_channel | ( |  | ) | const

Returns true if the channel is a text channel.

Returns
  true if text channel

## ◆ is_video_720p()

bool dpp::channel::is_video_720p | ( |  | ) | const

Returns true if video quality is 720p.

Returns
  true if video quality is 720p

## ◆ is_video_auto()

bool dpp::channel::is_video_auto | ( |  | ) | const

Returns true if video quality is auto.

Returns
  true if video quality is auto

## ◆ is_voice_channel()

bool dpp::channel::is_voice_channel | ( |  | ) | const

Returns true if the channel is a voice channel.

Returns
  true if voice channel

## ◆ operator!=()

bool dpp::managed::operator!= | ( | const managed & | other | ) | const

inline constexpr noexcept inherited

Comparison operator for comparing two managed objects by id.

Parameters

  other | Other object to compare against

Returns
  true objects are not the same id
  false objects are the same id

## ◆ operator==()

bool dpp::managed::operator== | ( | const managed & | other | ) | const

inline constexpr noexcept inherited

Comparison operator for comparing two managed objects by id.

Parameters

  other | Other object to compare against

Returns
  true objects are the same id
  false objects are not the same id

## ◆ remove_flag()

channel & dpp::channel::remove_flag | ( | const channel_flags | flag | ) |

Remove (bitwise NOT AND) a flag from this channel object.

Parameters

  flag | Flag bit to remove from dpp::channel_flags

Returns
  Reference to self, so these method calls may be chained

## ◆ remove_permission_overwrite()

channel & dpp::channel::remove_permission_overwrite | ( | const snowflake | target,
|  | const overwrite_type | type )

Remove channel specific permission overwrites of a user or role.

Parameters

  target | ID of the role or the member you want to remove permission overwrites of
  type | type of overwrite

Returns
  Reference to self, so these method calls may be chained

## ◆ set_bitrate()

channel & dpp::channel::set_bitrate | ( | const uint16_t | bitrate | ) |

Set bitrate of this channel object.

Parameters

  bitrate | Bitrate to set (in kilobits)

Returns
  Reference to self, so these method calls may be chained

## ◆ set_default_forum_layout()

channel & dpp::channel::set_default_forum_layout | ( | forum_layout_type | layout_type | ) |

Set the default forum layout type for the forum channel.

Parameters

  layout_type | The layout type

Returns
  Reference to self, so these method calls may be chained

## ◆ set_default_sort_order()

channel & dpp::channel::set_default_sort_order | ( | default_forum_sort_order_t | sort_order | ) |

Set the default forum sort order for the forum channel.

Parameters

  sort_order | The sort order

Returns
  Reference to self, so these method calls may be chained

## ◆ set_flags()

channel & dpp::channel::set_flags | ( | const uint16_t | flags | ) |

Set flags for this channel object.

Parameters

  flags | Flag bitmask to set from dpp::channel_flags

Returns
  Reference to self, so these method calls may be chained

## ◆ set_guild_id()

channel & dpp::channel::set_guild_id | ( | const snowflake | guild_id | ) |

Set guild_id of this channel object.

Parameters

  guild_id | Guild ID to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_lock_permissions()

channel & dpp::channel::set_lock_permissions | ( | const bool | is_lock_permissions | ) |

Set lock permissions property of this channel object Used only with the reorder channels method.

Parameters

  is_lock_permissions | true, if we are to inherit permissions from the category

Returns
  Reference to self, so these method calls may be chained

## ◆ set_name()

channel & dpp::channel::set_name | ( | const std::string & | name | ) |

Set name of this channel object.

Parameters

  name | Name to set

Returns
  Reference to self, so these method calls may be chained

Note
  name will be truncated to 100 chars, if longer

Exceptions

  dpp::length_exception | if length < 1

## ◆ set_nsfw()

channel & dpp::channel::set_nsfw | ( | const bool | is_nsfw | ) |

Set nsfw property of this channel object.

Parameters

  is_nsfw | true, if channel is nsfw

Returns
  Reference to self, so these method calls may be chained

## ◆ set_parent_id()

channel & dpp::channel::set_parent_id | ( | const snowflake | parent_id | ) |

Set parent_id of this channel object.

Parameters

  parent_id | Parent ID to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_permission_overwrite()

channel & dpp::channel::set_permission_overwrite | ( | const snowflake | target,
|  | const overwrite_type | type,
|  | const uint64_t | allowed_permissions,
|  | const uint64_t | denied_permissions )

Set permission overwrites for a user or role on this channel object. Old permission overwrites for the target will be overwritten.

Parameters

  target | ID of the role or the member you want to set overwrites for
  type | type of overwrite
  allowed_permissions | bitmask of allowed dpp::permissions for this user/role in this channel. Note: You can use the dpp::permission class
  denied_permissions | bitmask of denied dpp::permissions for this user/role in this channel. Note: You can use the dpp::permission class

Example:

channel.set_permission_overwrite(388499352297406481, dpp::ot_role, dpp::p_manage_channels | dpp::p_manage_messages, 0);
// Sets the allowed permissions to p_manage_channels and p_manage_messages and removes all denied permission flags for the provided role.

Returns
  Reference to self, so these method calls may be chained

Note
  If both allowed_permissions and denied_permissions parameters are 0, the permission overwrite for the target will be removed

## ◆ set_position()

channel & dpp::channel::set_position | ( | const uint16_t | position | ) |

Set position of this channel object.

Parameters

  position | Position to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_rate_limit_per_user()

channel & dpp::channel::set_rate_limit_per_user | ( | const uint16_t | rate_limit_per_user | ) |

Set rate_limit_per_user of this channel object.

Parameters

  rate_limit_per_user | rate_limit_per_user (slowmode in sec) to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_topic()

channel & dpp::channel::set_topic | ( | const std::string & | topic | ) |

Set topic of this channel object.

Parameters

  topic | Topic to set

Returns
  Reference to self, so these method calls may be chained

Note
  topic will be truncated to 1024 chars, if longer

## ◆ set_type()

channel & dpp::channel::set_type | ( | channel_type | type | ) |

Set type of this channel object.

Parameters

  type | Channel type to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_user_limit()

channel & dpp::channel::set_user_limit | ( | const uint8_t | user_limit | ) |

Set user_limit of this channel object.

Parameters

  user_limit | Limit to set

Returns
  Reference to self, so these method calls may be chained

## ◆ to_json()

auto dpp::json_interface< channel >::to_json | ( | bool | with_id = false | ) | const

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether to include the ID or not

Note
  Some fields are conditionally filled, do not rely on all fields being present

Returns
  json Json built from the structure

## ◆ to_json_impl()

virtual json dpp::channel::to_json_impl | ( | bool | with_id = false | ) | const

protected virtual

Build json for this channel object.

Parameters

  with_id | include the ID in the json

Returns
  json JSON object

Reimplemented in dpp::thread.

## Friends And Related Symbol Documentation

## ◆ json_interface< channel >

friend struct json_interface< channel >

friend

## Member Data Documentation

## ◆ available_tags

std::vector<forum_tag> dpp::channel::available_tags

A set of tags that can be used in a forum or media channel.

## ◆ bitrate

uint16_t dpp::channel::bitrate

The bitrate (in kilobits) of the voice channel.

## ◆ CHANNEL_TYPE_MASK

uint16_t dpp::channel::CHANNEL_TYPE_MASK = 0b0000000000001111

static constexpr protected

## ◆ default_auto_archive_duration

auto_archive_duration_t dpp::channel::default_auto_archive_duration

Default duration, copied onto newly created threads. Used by the clients, not the API. Threads will stop showing in the channel list after the specified period of inactivity. Defaults to dpp::arc_1_day.

## ◆ default_reaction

std::variant<std::monostate, snowflake, std::string> dpp::channel::default_reaction

The emoji to show as the default reaction button on a thread in a forum or media channel. Contains either nothing, the id of a guild's custom emoji or the unicode character of the emoji.

## ◆ default_sort_order

default_forum_sort_order_t dpp::channel::default_sort_order

The default sort order type used to order posts in forum and media channels.

## ◆ default_thread_rate_limit_per_user

uint16_t dpp::channel::default_thread_rate_limit_per_user

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.

## ◆ flags

uint16_t dpp::channel::flags

Flags bitmap (dpp::channel_flags).

## ◆ guild_id

snowflake dpp::channel::guild_id

Guild id of the guild that owns the channel.

## ◆ icon

utility::iconhash dpp::channel::icon

Channel icon (for group DMs).

## ◆ id

snowflake dpp::managed::id = {}

inherited

Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata.

## ◆ last_message_id

snowflake dpp::channel::last_message_id

ID of last message to be sent to the channel.

Warning
  may not point to an existing or valid message/thread.

## ◆ last_pin_timestamp

time_t dpp::channel::last_pin_timestamp

Timestamp of last pinned message.

## ◆ name

std::string dpp::channel::name

Channel name (1-100 characters).

## ◆ owner_id

snowflake dpp::channel::owner_id

User ID of the creator for group DMs or threads.

## ◆ parent_id

snowflake dpp::channel::parent_id

Parent ID (for guild channels: id of the parent category, for threads: id of the text channel this thread was created).

## ◆ permission_overwrites

std::vector<permission_overwrite> dpp::channel::permission_overwrites

Permission overwrites to apply to base permissions.

## ◆ permissions

permission dpp::channel::permissions

This is only filled when the channel is part of the resolved set sent within an interaction. Any other time it contains zero. When filled, it contains the calculated permission bitmask of the user issuing the command within this channel.

## ◆ position

uint16_t dpp::channel::position

Sorting position, lower number means higher up the list.

## ◆ rate_limit_per_user

uint16_t dpp::channel::rate_limit_per_user

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.

## ◆ recipients

std::vector<snowflake> dpp::channel::recipients

DM recipients.

## ◆ rtc_region

std::string dpp::channel::rtc_region

Voice region if set for voice channel, otherwise empty string.

## ◆ topic

std::string dpp::channel::topic

Channel topic (0-4096 characters for forum and media channels, 0-1024 characters for all others).

## ◆ user_limit

uint8_t dpp::channel::user_limit

Maximum user limit for voice channels (0-99).

D++ Library version 9.0.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0