69 jsonifier::vector<role_data>
roles{};
125 jsonifier::vector<snowflake> includeRoles{};
143 struct get_guild_integrations_data {
228 jsonifier::string templateCode{};
272 jsonifier::vector<jsonifier::string> features{};
273 snowflake publicUpdatesChannelId{};
275 bool premiumProgressBarEnabled{};
276 jsonifier::string preferredLocale{};
277 jsonifier::string discoverySplash{};
278 snowflake systemChannelId{};
279 snowflake rulesChannelId{};
280 jsonifier::string description{};
281 snowflake afkChannelId{};
282 jsonifier::string banner{};
283 jsonifier::string splash{};
284 jsonifier::string reason{};
287 jsonifier::string icon{};
288 jsonifier::string name{};
290 modify_guild_data(
const guild_data dataPackage);
295 DCA_INLINE stop_watch<milliseconds> stopWatchNew{ milliseconds{ 100 } };
305 static void initialize(discord_core_internal::https_client* client, config_manager* configManager);
310 static co_routine<audit_log_data> getGuildAuditLogsAsync(get_guild_audit_logs_data dataPackage);
315 static co_routine<guild_data> createGuildAsync(create_guild_data dataPackage);
319 static jsonifier::vector<guild_data> getAllGuildsAsync();
324 static co_routine<guild_data> getGuildAsync(get_guild_data dataPackage);
329 static guild_cache_data getCachedGuild(get_guild_data dataPackage);
334 static co_routine<guild_preview_data> getGuildPreviewAsync(get_guild_preview_data dataPackage);
339 static co_routine<guild_data> modifyGuildAsync(modify_guild_data dataPackage);
344 static co_routine<void> deleteGuildAsync(delete_guild_data dataPackage);
349 static co_routine<jsonifier::vector<ban_data>> getGuildBansAsync(get_guild_bans_data dataPackage);
354 static co_routine<ban_data> getGuildBanAsync(get_guild_ban_data dataPackage);
359 static co_routine<void> createGuildBanAsync(create_guild_ban_data dataPackage);
364 static co_routine<void> removeGuildBanAsync(remove_guild_ban_data dataPackage);
369 static co_routine<guild_prune_count_data> getGuildPruneCountAsync(get_guild_prune_count_data dataPackage);
374 static co_routine<guild_prune_count_data> beginGuildPruneAsync(begin_guild_prune_data dataPackage);
379 static co_routine<jsonifier::vector<voice_region_data>> getGuildVoiceRegionsAsync(get_guild_voice_regions_data dataPackage);
384 static co_routine<jsonifier::vector<invite_data>> getGuildInvitesAsync(get_guild_invites_data dataPackage);
389 static co_routine<jsonifier::vector<integration_data>> getGuildIntegrationsAsync(get_guild_integrations_data dataPackage);
394 static co_routine<void> deleteGuildIntegrationAsync(delete_guild_integration_data dataPackage);
399 static co_routine<guild_widget_data> getGuildWidgetSettingsAsync(get_guild_widget_settings_data dataPackage);
404 static co_routine<guild_widget_data> modifyGuildWidgetAsync(modify_guild_widget_data dataPackage);
409 static co_routine<guild_widget_data> getGuildWidgetAsync(get_guild_widget_data dataPackage);
414 static co_routine<invite_data> getGuildVanityInviteAsync(get_guild_vanity_invite_data dataPackage);
419 static co_routine<guild_widget_image_data> getGuildWidgetImageAsync(get_guild_widget_image_data dataPackage);
424 static co_routine<welcome_screen_data> getGuildWelcomeScreenAsync(get_guild_welcome_screen_data dataPackage);
429 static co_routine<welcome_screen_data> modifyGuildWelcomeScreenAsync(modify_guild_welcome_screen_data dataPackage);
434 static co_routine<guild_template_data> getGuildTemplateAsync(get_guild_template_data dataPackage);
439 static co_routine<guild_data> createGuildFromGuildTemplateAsync(create_guild_from_guild_template_data dataPackage);
444 static co_routine<jsonifier::vector<guild_template_data>> getGuildTemplatesAsync(get_guild_templates_data dataPackage);
449 static co_routine<guild_template_data> createGuildTemplateAsync(create_guild_template_data dataPackage);
454 static co_routine<guild_template_data> syncGuildTemplateAsync(sync_guild_template_data dataPackage);
459 static co_routine<guild_template_data> modifyGuildTemplateAsync(modify_guild_template_data dataPackage);
464 static co_routine<void> deleteGuildTemplateAsync(delete_guild_template_data dataPackage);
469 static co_routine<invite_data> getInviteAsync(get_invite_data dataPackage);
474 static co_routine<void> deleteInviteAsync(delete_invite_data dataPackage);
479 static co_routine<jsonifier::vector<guild_data>> getCurrentUserGuildsAsync(get_current_user_guilds_data dataPackage);
484 static co_routine<void> leaveGuildAsync(leave_guild_data dataPackage);
486 template<
typename guild_type> DCA_INLINE
static void insertGuild(guild_type&& guild) {
487 if (doWeCacheGuildsBool) {
489 throw dca_exception{
"Sorry, but there was no id set for that guild." };
491 cache.emplace(std::forward<guild_type>(guild));
492 if (cache.count() % 1000 == 0) {
493 std::cout <<
"guild count: " << cache.count() <<
", after: " << stopWatchNew.totalTimeElapsed().count() << std::endl;
498 static object_cache<guild_cache_data>& getCache();
500 static void removeGuild(
const guild_cache_data& guild_id);
502 static bool doWeCacheGuilds();
505 static discord_core_internal::https_client* httpsClient;
506 static object_cache<guild_cache_data> cache;
507 static bool doWeCacheGuildsBool;
An interface class for the guild_data related discord endpoints.
system_channel_flags
System channel flags.
explicit_content_filter_level
Explicit content filter levels.
audit_log_event
Audit log events.
verification_level
/// verification levels.
widget_style_options
Widget style options.
afk_time_out_durations
Afk timeout durations.
default_message_notification_level
Default message notification levels.
The main namespace for the forward-facing interfaces.
For pruning a number of guild_members from the guild.
snowflake guildId
Guild within which to perform the prune.
bool computePruneCount
roles to be included in the prune.
jsonifier::string reason
whether 'pruned' is returned, discouraged for large guilds.
For banning a current guild_member_data.
jsonifier::string reason
The reason for the ban.
snowflake guildId
The id of the guild from which to ban the member.
snowflake guildMemberId
The id of the member to be banned.
int32_t deleteMessageDays
The number of days of their messages to delete.
snowflake systemChannelId
The id of the channel_data where guild notices such as welcome messages and boost events are posted.
default_message_notification_level defaultMessageNotifications
Default message notification level.
explicit_content_filter_level explicitContentFilter
Explicit content filter level.
int32_t verificationLevel
Verification level.
int32_t systemChannelFlags
System channel_data flags.
jsonifier::vector< role_data > roles
Array of role_data objects.
jsonifier::string icon
Base64 128x128 image for the guild icon.
jsonifier::string region
The region that the servers are in.
snowflake afkChannelId
snowflake for afk channel_data.
afk_time_out_durations afkTimeout
Afk timeout in seconds.
jsonifier::string name
The name of the new guild.
jsonifier::vector< channel_data > channels
Array of partial channel_data objects.
For creating a guild from a guild template.
jsonifier::string templateCode
code for the desired template to use.
jsonifier::string imageData
Base64 128x128 image for the guild icon.
jsonifier::string name
Desired name of the guild.
For creating a guild template.
jsonifier::string description
Description for the template (0 - 120 characters).
jsonifier::string name
Name of the template (1 - 100 characters).
snowflake guildId
Guild within which you wuold like to create the template.
snowflake guildId
The guild you would like to delete.
For deleting a guild integration.
jsonifier::string reason
Reason for deleting the integration.
snowflake guildId
The guild from which to delete the integration from.
snowflake integrationId
The integration's id which we are going to delete.
For deleting a guild template.
snowflake guildId
The guild within which you would like to delete the template.
jsonifier::string templateCode
The template which you would like to delete.
For deleting a single guild invite.
snowflake inviteId
The invite which you would like to delete.
jsonifier::string reason
Reason for deleting the invite.
For collecting a list of guild's that the bot is in.
uint32_t limit
Max number of guilds to return (1 - 200).
snowflake before
Get guilds before this guild id.
snowflake after
Get guilds after this guild id.
For geting a guild's audit logs.
int32_t limit
The maximum number of actions to acquire from the log.
audit_log_event actionType
The action type to acquire audit-logs for.
snowflake guildId
The guiild id for the guild which you wish to query the log of.
snowflake userId
The user_data for whom to look for the actions of.
snowflake before
Entries that preceded a specific audit log entry id.
For getting a single guild ban.
snowflake guildId
The guild from which to collect the ban from.
snowflake userId
The user_data for whom to collect the ban of.
For getting a list of guild bans.
snowflake guildId
The guild from which to collect the list of bans.
snowflake after
consider only users after given user id null.
snowflake before
consider only users before given user id.
uint64_t limit
Number of users to return ( up to maximum 1000 ).
For getting a guild from the library's cache or a discord server.
snowflake guildId
The id of the guild to acquire.
For geting all of the current invites from a guild.
snowflake guildId
The id of the guild you wish to acquire.
For acquiring a guild preview of a chosen guild.
snowflake guildId
The id of the guild's preview to acquire.
For collecting the guild prune count.
snowflake guildId
The guild to be pruned.
int32_t days
The number of days beyond which to prune the user's for inactivity.
jsonifier::vector< snowflake > includeRoles
Roles to be included in the prune.
For collecting a guild's template.
jsonifier::string templateCode
code for the desired template.
For collecting a list of guild templates from a chosen guild.
snowflake guildId
Guild from which you would like to collect the templates from.
For geting the vanity invite responseData of a guild.
snowflake guildId
The id of the guild to acquire the vanity invite from.
For collecting a list of guild voice regions.
snowflake guildId
The guild for which to collect the voice regions from.
For collecting a guild's welcome screen.
snowflake guildId
The guild for which to collect the widget image from.
For geting a single invite's responseData from a guild.
snowflake guildScheduledEventId
The guild scheduled event to include with the invite.
snowflake inviteId
The id of the invite you wish to acquire.
bool withCount
collect usage etc counts?
bool withExpiration
collect expiration time/date?
For leaving a particular guild.
snowflake guildId
The id of the guild you would like the bot to leave.
For modifying the properties of a chosen guild.
For modifying a guild template.
snowflake guildId
Guild within which you would like to modify the template.
jsonifier::string name
Name of the template (1 - 100 characters).
jsonifier::string description
template which you would like to modify.
For modifying a guild's welcome screen.
bool enabled
Is it enabled?
jsonifier::string reason
The reason for modifying the welcome screen.
jsonifier::string description
The description of the welcome screen.
snowflake guildId
The guild for which to modify the welcome screen of.
jsonifier::vector< welcome_screen_channel_data > welcomeChannels
Welcome channels for the welcome screen.
For removing a previous created ban.
jsonifier::string reason
The reason for removing this ban.
snowflake guildId
The guild from which to erase the ban.
snowflake userId
The user snowflake of the user who's ban to erase.
For syncing a guild template.
snowflake guildId
Guild for which you would like to sync the template of.
jsonifier::string templateCode
Template code for which template you would like to sync.