![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Represents an integration on a guild, e.g. a connection to twitch. More...
#include <integration.h>
Public Member Functions | |
integration () | |
~integration ()=default | |
bool | emoticons_enabled () const |
bool | is_enabled () const |
bool | is_syncing () const |
bool | is_revoked () const |
bool | expiry_kicks_user () const |
constexpr double | get_creation_time () const noexcept |
Get the creation time of this object according to Discord. More... | |
constexpr bool | operator== (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
constexpr bool | operator!= (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
integration & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
Public Attributes | |
std::string | name |
integration name More... | |
integration_type | type |
integration type (twitch, youtube, discord, or guild_subscription) More... | |
uint8_t | flags |
integration flags from dpp::integration_flags More... | |
snowflake | role_id |
id that this integration uses for "subscribers" More... | |
uint32_t | expire_grace_period |
The grace period (in days) before expiring subscribers. More... | |
user | user_obj |
user for this integration More... | |
integration_account | account |
integration account information More... | |
time_t | synced_at |
when this integration was last synced More... | |
uint32_t | subscriber_count |
how many subscribers this integration has More... | |
integration_app | app |
the bot/OAuth2 application for discord integrations More... | |
std::vector< std::string > | scopes |
the scopes the application has been authorized for More... | |
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... | |
Protected Member Functions | |
integration & | fill_from_json_impl (nlohmann::json *j) |
virtual json | to_json_impl (bool with_id=false) const |
Friends | |
struct | json_interface< integration > |
Represents an integration on a guild, e.g. a connection to twitch.
dpp::integration::integration | ( | ) |
Default constructor
|
default |
Default destructor
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
bool dpp::integration::emoticons_enabled | ( | ) | const |
Are emoticons enabled for this integration?
bool dpp::integration::expiry_kicks_user | ( | ) | const |
Will the user be kicked if their subscription runs out to the integration? If false, the integration will simply remove the role that is specified by role_id
.
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
|
protected |
Read class values from json object
j | A json object to read from |
|
inlineconstexprnoexceptinherited |
Get the creation time of this object according to Discord.
bool dpp::integration::is_enabled | ( | ) | const |
Is the integration enabled?
bool dpp::integration::is_revoked | ( | ) | const |
Has this integration been revoked?
bool dpp::integration::is_syncing | ( | ) | const |
Is the integration syncing?
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
protectedvirtual |
Build a json from this object.
with_id | Add ID to output |
|
friend |
integration_account dpp::integration::account |
integration account information
integration_app dpp::integration::app |
the bot/OAuth2 application for discord integrations
uint32_t dpp::integration::expire_grace_period |
The grace period (in days) before expiring subscribers.
uint8_t dpp::integration::flags |
integration flags from dpp::integration_flags
|
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.
std::string dpp::integration::name |
integration name
snowflake dpp::integration::role_id |
id that this integration uses for "subscribers"
std::vector<std::string> dpp::integration::scopes |
the scopes the application has been authorized for
uint32_t dpp::integration::subscriber_count |
how many subscribers this integration has
time_t dpp::integration::synced_at |
when this integration was last synced
integration_type dpp::integration::type |
integration type (twitch, youtube, discord, or guild_subscription)
user dpp::integration::user_obj |
user for this integration