91 class DiscordCoreAPI_Dll
users {
94 friend class discord_core_internal::base_socket_agent;
152 template<
typename user_type>
inline static void insertUser(user_type&& user) {
153 if (doWeCacheUsersBool) {
155 throw dca_exception{
"Sorry, but there was no id set for that user." };
157 cache.emplace(std::forward<user_type>(user));
158 if (cache.count() % 1000 == 0) {
159 std::cout <<
"current user count: " << cache.count() << std::endl;
164 static bool doWeCacheUsers();
169 static bool doWeCacheUsersBool;
A co_routine - representing a potentially asynchronous operation/function.
discord_core_client - the main class for this library.
For sending Https requests.
A websocket client, for communication via a tcp-connection.
A template class representing an object cache.
A class representing a snowflake identifier with various operations.
An interface class for the user_data related discord endpoints.
The main namespace for the forward-facing interfaces.
For adding a user to a group dm.
snowflake userId
The user's snowflake.
snowflake channelId
The channel_data snowflake of the dm.
jsonifier::string token
The user's access token.
jsonifier::string nick
The user's nickname.
An exception class derived from std::runtime_error for dca-related exceptions.
For getting user_data responseData from the library's cache or the discord server.
snowflake userId
The id of the desired user_data.
For modifying the bot's user_data responseData.
jsonifier::string userName
User_data's username, if changed may cause the user's discriminator to be randomized.
jsonifier::string avatar
If passed, modifies the user's avatar.
For updating the bot's current voice state.
bool suppress
Toggles the user's suppress state.
snowflake guildId
The guild within which to update the bot's voice state.
jsonifier::string requestToSpeakTimestamp
Iso8601 timeStamp.
snowflake channelId
The id of the channel_data the user is currently in.
For modifying a user's voice state.
snowflake guildId
The guild within which you would like to modify their voice state.
snowflake userId
The user for which you would like to modify the voice state of.
bool suppress
Toggles the user's suppress state.
snowflake channelId
The id of the channel_data the user is currently in.
For removing a user from a group dm.
snowflake channelId
The channel_data snowflake of the dm.
snowflake userId
The user's snowflake.