91 class DiscordCoreAPI_Dll
users {
93 friend class discord_core_internal::websocket_client;
94 friend class discord_core_internal::base_socket_agent;
95 friend class discord_core_client;
99 static void initialize(discord_core_internal::https_client*, config_manager* configManagerNew);
104 static co_routine<void> addRecipientToGroupDMAsync(add_recipient_to_group_dmdata dataPackage);
109 static co_routine<void> removeRecipientFromGroupDMAsync(remove_recipient_from_group_dmdata dataPackage);
114 static co_routine<void> modifyCurrentUserVoiceStateAsync(modify_current_user_voice_state_data dataPackage);
119 static co_routine<void> modifyUserVoiceStateAsync(modify_user_voice_state_data dataPackage);
123 static co_routine<user_data> getCurrentUserAsync();
128 static user_cache_data getCachedUser(get_user_data dataPackage);
133 static co_routine<user_data> getUserAsync(get_user_data dataPackage);
138 static co_routine<user_data> modifyCurrentUserAsync(modify_current_user_data dataPackage);
142 static co_routine<jsonifier::vector<connection_data>> getUserConnectionsAsync();
146 static co_routine<application_data> getCurrentUserApplicationInfoAsync();
150 static co_routine<authorization_info_data> getCurrentUserAuthorizationInfoAsync();
152 template<
typename user_type> DCA_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();
167 static discord_core_internal::https_client* httpsClient;
168 static object_cache<user_cache_data> cache;
169 static bool doWeCacheUsersBool;