dpp::forum_tag
dpp::managed
dpp::json_interface< forum_tag >
channel.h
struct friend struct json_interface< forum_tag > json_interface< forum_tag > dpp::forum_tag::json_interface< forum_tag > json_interface< forum_tag >
std::variant< std::monostate, snowflake, std::string > std::variant<std::monostate, snowflake, std::string> dpp::forum_tag::emoji emoji dpp::forum_tag::emoji

The emoji of the tag. Contains either nothing, the id of a guild's custom emoji or the unicode character of the emoji.

snowflake snowflake dpp::managed::id id dpp::managed::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.

bool bool dpp::forum_tag::moderated moderated dpp::forum_tag::moderated

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

std::string std::string dpp::forum_tag::name name dpp::forum_tag::name

The name of the tag (0-20 characters).

forum_tag & forum_tag & dpp::forum_tag::fill_from_json_impl (nlohmann::json *j) fill_from_json_impl dpp::forum_tag::fill_from_json_impl nlohmann::json * j

Read struct values from a json object.

j

json to read values from

A reference to self

json json dpp::forum_tag::to_json_impl (bool with_id=false) const to_json_impl dpp::forum_tag::to_json_impl bool with_id false

Build json for this forum_tag object.

with_id

include the ID in the json

json JSON object

dpp::forum_tag::forum_tag
()
forum_tag
dpp::forum_tag::forum_tag

Constructor

dpp::forum_tag::forum_tag
(const std::string &name)
forum_tag
dpp::forum_tag::forum_tag
const std::string & name

Constructor.

name

The name of the tag. It will be truncated to the maximum length of 20 UTF-8 characters.

virtual dpp::forum_tag::~forum_tag
()=default
~forum_tag
dpp::forum_tag::~forum_tag

Destructor

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

Convert object to json string.

with_id

Whether to include the ID or not

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

std::string Json built from the structure

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

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

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

Get the creation time of this object according to Discord.

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

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

Comparison operator for comparing two managed objects by id.

other

Other object to compare against

true objects are not the same id

false objects are the same id

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

Comparison operator for comparing two managed objects by id.

other

Other object to compare against

true objects are the same id

false objects are not the same id

forum_tag & forum_tag & dpp::forum_tag::set_name (const std::string &name) set_name dpp::forum_tag::set_name const std::string & name

Set name of this forum_tag object.

name

Name to set

Reference to self, so these method calls may be chained

name will be truncated to 20 chars, if longer

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

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

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

json Json built from the structure

Represents a tag that is able to be applied to a thread in a forum or media channel.

dpp::forum_tag
dpp::json_interface< T >
dpp::json_interface< forum_tag >
< forum_tag >
dpp::managed
bool
dpp::forum_tag
name
emoji
moderated
dpp::json_interface< T >
dpp::json_interface< forum_tag >
< forum_tag >
dpp::managed
id
dpp::snowflake
value
std::basic_string< Char >
std::string
variant< std::monostate, dpp::snowflake, std::string >
uint64_t
- dpp::forum_tag
  build_json
- dpp::forum_tag
  emoji
- dpp::forum_tag
  fill_from_json
- dpp::forum_tag
  fill_from_json_impl
- dpp::forum_tag
  forum_tag
- dpp::forum_tag
  forum_tag
- dpp::forum_tag
  get_creation_time
- dpp::forum_tag
  id
- dpp::forum_tag
  json_interface< forum_tag >
- dpp::forum_tag
  managed
- dpp::forum_tag
  managed
- dpp::forum_tag
  managed
- dpp::forum_tag
  managed
- dpp::forum_tag
  moderated
- dpp::forum_tag
  name
- dpp::forum_tag
  operator!=
- dpp::forum_tag
  operator=
- dpp::forum_tag
  operator=
- dpp::forum_tag
  operator==
- dpp::forum_tag
  set_name
- dpp::forum_tag
  to_json
- dpp::forum_tag
  to_json_impl
- dpp::forum_tag
  ~forum_tag
- dpp::forum_tag
  ~managed