86 modify_guild_member_data(
const guild_member_data& other);
87 std::unordered_set<jsonifier::string> jsonifierExcludedKeys{};
88 jsonifier::string communicationDisabledUntil{};
89 jsonifier::vector<snowflake> roleIds{};
90 jsonifier::string reason{};
91 snowflake guildMemberId{};
92 jsonifier::string nick{};
93 snowflake channelId{};
125 friend class discord_core_internal::websocket_client;
126 friend class discord_core_client;
127 friend class guild_member_data;
128 friend class guild_data;
131 static void initialize(discord_core_internal::https_client*, config_manager* configManagerNew);
136 static co_routine<guild_member_data> getGuildMemberAsync(get_guild_member_data dataPackage);
141 static guild_member_cache_data getCachedGuildMember(get_guild_member_data dataPackage);
146 static co_routine<jsonifier::vector<guild_member_data>> listGuildMembersAsync(list_guild_members_data dataPackage);
151 static co_routine<jsonifier::vector<guild_member_data>> searchGuildMembersAsync(search_guild_members_data dataPackage);
156 static co_routine<guild_member_data> addGuildMemberAsync(add_guild_member_data dataPackage);
161 static co_routine<guild_member_data> modifyGuildMemberAsync(modify_guild_member_data dataPackage);
166 static co_routine<guild_member_data> modifyCurrentGuildMemberAsync(modify_current_guild_member_data dataPackage);
171 static co_routine<void> removeGuildMemberAsync(remove_guild_member_data dataPackage);
176 static co_routine<guild_member_data> timeoutGuildMemberAsync(timeout_guild_member_data dataPackage);
178 template<
typename voice_state_type> DCA_INLINE
static void insertVoiceState(voice_state_type&& voiceState) {
179 if (doWeCacheVoiceStatesBool) {
180 if (voiceState.userId == 0) {
181 throw dca_exception{
"Sorry, but there was no id set for that voice state." };
183 vsCache.emplace(std::forward<voice_state_type>(voiceState));
187 template<
typename guild_member_type> DCA_INLINE
static void insertGuildMember(guild_member_type&& guildMember) {
188 if (doWeCacheGuildMembersBool) {
189 if (guildMember.guildId == 0 || guildMember.user.id == 0) {
190 throw dca_exception{
"Sorry, but there was no id set for that guildmember." };
192 cache.emplace(
static_cast<guild_member_cache_data
>(std::forward<guild_member_type>(guildMember)));
199 static voice_state_data_light getVoiceStateData(
const two_id_key& voiceState);
201 static void removeGuildMember(
const two_id_key& guildMemberId);
203 static void removeVoiceState(
const two_id_key& voiceState);
205 static bool doWeCacheGuildMembers();
207 static bool doWeCacheVoiceStates();
210 static discord_core_internal::https_client* httpsClient;
211 static object_cache<voice_state_data_light> vsCache;
212 static object_cache<guild_member_cache_data> cache;
213 static bool doWeCacheGuildMembersBool;
214 static bool doWeCacheVoiceStatesBool;