D++ (DPP)
C++ Discord API Bot Library
|
Represents a tag that is able to be applied to a thread in a forum channel. More...
#include <channel.h>
Public Member Functions | |
forum_tag () | |
virtual | ~forum_tag () |
forum_tag & | fill_from_json (nlohmann::json *j) |
Read struct values from a json object. More... | |
std::string | build_json (bool with_id=false) const |
Build json for this forum_tag object. More... | |
forum_tag & | set_name (const std::string &name) |
Set name of this forum_tag object. More... | |
double | get_creation_time () const |
Get the creation time of this object according to Discord. More... | |
bool | operator== (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
bool | operator!= (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
Public Attributes | |
std::string | name |
std::variant< std::monostate, snowflake, std::string > | emoji |
bool | moderated |
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. More... | |
Represents a tag that is able to be applied to a thread in a forum channel.
dpp::forum_tag::forum_tag | ( | ) |
Constructor
|
virtual |
Destructor
std::string dpp::forum_tag::build_json | ( | bool | with_id = false | ) | const |
Build json for this forum_tag object.
with_id | include the ID in the json |
forum_tag & dpp::forum_tag::fill_from_json | ( | nlohmann::json * | j | ) |
Read struct values from a json object.
j | json to read values from |
|
inherited |
Get the creation time of this object according to Discord.
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
forum_tag & dpp::forum_tag::set_name | ( | const std::string & | name | ) |
Set name of this forum_tag object.
name | Name to set |
std::variant<std::monostate, snowflake, std::string> 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
|
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.
bool 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 dpp::forum_tag::name |
The name of the tag (0-20 characters)