38namespace DiscordCoreAPI {
67 jsonifier::vector<Snowflake>
roles{};
122 friend class DiscordCoreInternal::WebSocketClient;
128 static void initialize(DiscordCoreInternal::HttpsClient*, ConfigManager* configManagerNew);
175 template<
typename VoiceStateType>
static inline VoiceStateDataLight& insertVoiceState(VoiceStateType&& voiceState) {
176 if (voiceState.userId == 0) {
177 throw DCAException{
"Sorry, but there was no id set for that voice state." };
179 return **vsCache.emplace(std::forward<VoiceStateType>(voiceState));
182 template<
typename GuildMemberType>
static inline void insertGuildMember(GuildMemberType&& guildMember) {
183 if (doWeCacheGuildMembersBool) {
184 if (guildMember.guildId == 0 || guildMember.user.id == 0) {
185 throw DCAException{
"Sorry, but there was no id set for that guildmember." };
193 static void removeGuildMember(
const TwoIdKey& guildMemberId);
195 static void removeVoiceState(
const TwoIdKey& voiceState);
197 static bool doWeCacheGuildMembers();
200 static DiscordCoreInternal::HttpsClient* httpsClient;
203 static bool doWeCacheGuildMembersBool;
TimeoutDurations
Timeout durations for the timeout command.
A CoRoutine - representing a potentially asynchronous operation/function.
DiscordCoreClient - The main class for this library.
Data structure representing a single GuildMemberData.
Data structure representing a single GuildMemberData.
A discord Guild. Used to connect to/disconnect from voice.
For getting a GuildMember, from the library's cache or Discord server.
Snowflake guildId
The id of the Guild from which you would like to acquire a member.
Snowflake guildMemberId
The user id of the desired GuildMemberData.
For listing the GuildMembers of a chosen Guild.
int32_t limit
Max number of members to return (1 - 1000).
Snowflake guildId
Guild from which to list the GuildMembers.
Snowflake after
The highest user id in the previous page.
For searching for one or more GuildMembers within a chosen Guild.
Snowflake guildId
Guild within which to search for the GuildMembers.
int32_t limit
Max number of members to return (1 - 1000).
std::string query
Query std::string to match username(s) and nickname(s) against.
For adding a new GuildMemberData to a chosen Guild.
Snowflake userId
The UserData id of the user you wish to add.
std::string accessToken
An oauth2 access token granted with the guilds.join to the bot's application for the user you want to...
bool mute
Whether the user is muted in voice channels.
bool deaf
Whether the user is deafened in voice channels.
jsonifier::vector< Snowflake > roles
Array of RoleData ids the member is assigned.
Snowflake guildId
The Guild to add the new GuildMemberData to.
std::string nick
Value to set users nickname to.
For modifying the current GuildMemberData's values.
std::string reason
A reason for modifying the current user's values.
Snowflake guildId
The Guild within which to modify the current user's values.
std::string nick
A new nickname for the current user.
For modifying a GuildMember's values.
std::string communicationDisabledUntil
When the user's timeout will expire and the user will be able to communicate in the guild again.
std::string reason
Reason for modifying this GuildMemberData.
bool mute
Whether or not to mute them in voice.
jsonifier::vector< Snowflake > roleIds
A collection of RoleData id's to be applied to them.
bool deaf
Whether or not to deafen them, in voice.
Snowflake guildId
The id of the Guild for which you would like to modify a member.
std::string nick
Their new display/nick name.
Snowflake currentChannelId
The current voice ChannelData, if applicaple.
Snowflake newVoiceChannelId
The new voice ChannelData to move them into.
Snowflake guildMemberId
The user id of the desired Guild memeber.
For removing a GuildMember from a chosen Guild.
std::string reason
Reason for kicking the GuildMemberData.
Snowflake guildMemberId
Snowflake of the chosen GuildMemberData to kick.
Snowflake guildId
Guild from which to kick the chosen GuildMemberData.
For timing out a GuildMember.
Snowflake guildId
The id of the Guild from which you would like to acquire a member.
Snowflake guildMemberId
The id of the GuildMemberData to be timed-out.
std::string reason
Reason for timing them out.
TimeoutDurations numOfMinutesToTimeoutFor
The number of minutes to time-out the GuildMemberData for.
An interface class for the GuildMemberData 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.