67 jsonifier::vector<snowflake>
roles{};
175 template<
typename voice_state_type>
inline static void insertVoiceState(voice_state_type&& voiceState) {
176 if (doWeCacheVoiceStatesBool) {
177 if (voiceState.userId == 0) {
178 throw dca_exception{
"Sorry, but there was no id set for that voice state." };
180 vsCache.emplace(std::forward<voice_state_type>(voiceState));
184 template<
typename guild_member_type>
inline static void insertGuildMember(guild_member_type&& guildMember) {
185 if (doWeCacheGuildMembersBool) {
186 if (guildMember.guildId == 0 || guildMember.user.id == 0) {
187 throw dca_exception{
"Sorry, but there was no id set for that guildmember." };
198 static void removeGuildMember(
const two_id_key& guildMemberId);
200 static void removeVoiceState(
const two_id_key& voiceState);
202 static bool doWeCacheGuildMembers();
204 static bool doWeCacheVoiceStates();
210 static bool doWeCacheGuildMembersBool;
211 static bool doWeCacheVoiceStatesBool;
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 discord guild. used to connect to/disconnect from voice.
Data structure representing a single guild_member_data.
Data structure representing a single guild_member_data.
An interface class for the guild_member_data related discord endpoints.
A template class representing an object cache.
An interface class for the role_data related discord endpoints.
A class representing a snowflake identifier with various operations.
timeout_durations
Timeout durations for the timeout command.
The main namespace for the forward-facing interfaces.
For adding a new guild_member_data to a chosen guild.
snowflake userId
The user_data id of the user you wish to add.
jsonifier::string nick
Value to set users nickname to.
bool mute
Whether the user is muted in voice channels.
bool deaf
Whether the user is deafened in voice channels.
jsonifier::string accessToken
An oauth2 access token granted with the guilds.join to the bot's application for the user you want to...
snowflake guildId
The guild to add the new guild_member_data to.
An exception class derived from std::runtime_error for dca-related exceptions.
For getting a guild_member, from the library's cache or discord server.
snowflake guildMemberId
The user id of the desired guild_member_data.
snowflake guildId
The id of the guild from which you would like to acquire a member.
For listing the guild_members of a chosen guild.
snowflake after
The highest user id in the previous page.
int32_t limit
Max number of members to return (1 - 1000).
snowflake guildId
Guild from which to list the guild_members.
For modifying the current guild_member_data's values.
jsonifier::string nick
A new nickname for the current user.
jsonifier::string reason
A reason for modifying the current user's values.
snowflake guildId
The guild within which to modify the current user's values.
For modifying a guild_member's values.
snowflake guildId
The id of the guild for which you would like to modify a member.
jsonifier::string communicationDisabledUntil
When the user's timeout will expire and the user will be able to communicate in the guild again.
jsonifier::vector< snowflake > roleIds
A collection of role_data id's to be applied to them.
bool deaf
Whether or not to deafen them, in voice.
bool mute
Whether or not to mute them in voice.
jsonifier::string reason
Reason for modifying this guild_member_data.
jsonifier::string nick
Their new display/nick name.
snowflake currentChannelId
The current voice channel_data, if applicaple.
snowflake newVoiceChannelId
The new voice channel_data to move them into.
snowflake guildMemberId
The user id of the desired guild memeber.
For removing a guild_member from a chosen guild.
snowflake guildMemberId
snowflake of the chosen guild_member_data to kick.
snowflake guildId
Guild from which to kick the chosen guild_member_data.
jsonifier::string reason
Reason for kicking the guild_member_data.
For searching for one or more guild_members within a chosen guild.
int32_t limit
Max number of members to return (1 - 1000).
snowflake guildId
Guild within which to search for the guild_members.
jsonifier::string query
Query jsonifier::string to match username(s) and nickname(s) against.
For timing out a guild_member.
jsonifier::string reason
Reason for timing them out.
snowflake guildMemberId
The id of the guild_member_data to be timed-out.
snowflake guildId
The id of the guild from which you would like to acquire a member.
timeout_durations numOfMinutesToTimeoutFor
The number of minutes to time-out the guild_member_data for.