37namespace DiscordCoreAPI {
87 template<
typename ValueType>
friend struct jsonifier::core;
96 jsonifier::vector<RolePositionData> rolePositions;
141 friend class DiscordCoreInternal::WebSocketClient;
147 static void initialize(DiscordCoreInternal::HttpsClient*, ConfigManager* configManagerNew);
199 template<
typename RoleType>
static inline void insertRole(RoleType&& role) {
200 if (doWeCacheRolesBool) {
202 throw DCAException{
"Sorry, but there was no id set for that role." };
204 cache.emplace(
static_cast<RoleCacheData>(std::forward<RoleType>(role)));
205 if (cache.count() % 1000 == 0) {
206 std::cout <<
"CURRENT ROLE COUNT: " << cache.count() << std::endl;
213 static bool doWeCacheRoles();
216 static DiscordCoreInternal::HttpsClient* httpsClient;
218 static bool doWeCacheRolesBool;
A CoRoutine - representing a potentially asynchronous operation/function.
DiscordCoreClient - The main class for this library.
Data structure representing a single RoleData.
Data structure representing a single GuildMemberData.
A discord Guild. Used to connect to/disconnect from voice.
For addin a RoleData to a GuildMember.
std::string reason
Reason for adding the GuildMemberData's RoleData.
Snowflake userId
The id of the UserData to whom to assign the RoleData.
Snowflake roleId
The id of the RoleData to be assigned.
Snowflake guildId
The id of the Guild within which to assign the RoleData.
For removing a RoleData from a GuildMember.
Snowflake userId
The id of the UserData from whom to remove the RoleData.
std::string reason
Reason for removing the GuildMemberData's RoleData.
Snowflake guildId
The id of the Guild within which to remove the RoleData.
Snowflake roleId
The id of the RoleData to be removed.
For getting a chosen Guild's Roles.
Snowflake guildId
Guild id for which Guild to get the roles from.
For creating a new RoleData within a chosen Guild.
std::string name
The name of the RoleData.
Snowflake guildId
Which Guild to make the RoleData in.
bool hoist
Is this RoleData hoisted above the rest of them?
bool mentionable
Is it mentionable by others in the Guild.
uint32_t position
The position amongst the other roles.
std::string unicodeEmoji
The role's unicode emoji as a standard emoji.
std::string icon
Image data the role's icon image (if the guild has the ROLE_ICONS feature) null.
std::string reason
Reason for creating the RoleData.
std::string hexColorValue
Hex color-value between 0 and ffffff.
PermissionsParse permissions
The base permissions to give the RoleData.
For updating the positions of the roles.
Snowflake roleId
The RoleData to update.
uint32_t rolePosition
The new RoleData position.
For updating the RoleData positions.
Snowflake guildId
The Guild within which to move the RoleData.
std::string reason
Reason for modifying the RoleData positions.
uint32_t newPosition
The new position of the RoleData.
Snowflake roleId
The id of the RoleData to move.
For updating a RoleData's options within a chosen Guild.
std::string name
What the name of the RoleData is going to be.
std::string unicodeEmoji
The role's unicode emoji as a standard emoji.
std::string icon
Image data the role's icon image (if the guild has the ROLE_ICONS feature) null.
Snowflake roleId
The id of the RoleData to update.
PermissionsParse permissions
Base Guild permissions for the RoleData.
std::string reason
< Reason for modifying the RoleData.
Snowflake guildId
The id of the Guild within which to update the RoleData.
bool hoist
Is this RoleData hoisted above the others?
bool mentionable
Is it mentionable?
std::string hexColorValue
A hex-color value between 0x00 and 0xFFFFFF.
For removing a RoleData from a chosen Guild.
Snowflake roleId
The id of the RoleData to remove.
std::string reason
Reason for removing this RoleData.
Snowflake guildId
The id of the Guild from which to remove the RoleData.
For getting a chosen GuildMemberData's Roles.
GuildMemberData guildMember
Which Guild member to collect the roles from.
Snowflake guildId
Which Guild to collect their roles from.
For getting a RoleData from the library's cache, or the Discord server.
Snowflake guildId
Which Guild to collect the RoleData from.
Snowflake roleId
Which RoleData to collect.
An interface class for the RoleData related Discord endpoints.
A class representing a Snowflake identifier with various operations.
An exception class derived from std::runtime_error for DCA-related exceptions.
A template class representing an object cache.