DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
GuildEntities.hpp
Go to the documentation of this file.
1/*
2 MIT License
3
4 DiscordCoreAPI, A bot library for Discord, written in C++, and featuring explicit multithreading through the usage of custom, asynchronous C++ CoRoutines.
5
6 Copyright 2022, 2023 Chris M. (RealTimeChris)
7
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be included in all
16 copies or substantial portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 SOFTWARE.
25*/
26/// GuildEntities.hpp - Header for the guild classes and structs.
27/// May 12, 2021
28/// https://discordcoreapi.com
29/// \file GuildEntities.hpp
30#pragma once
31
39
40namespace discord_core_api {
41
42 /**
43 * \addtogroup foundation_entities
44 * @{
45 */
46
47 /// @brief For geting a guild's audit logs.
49 audit_log_event actionType{};///< The action type to acquire audit-logs for.
50 snowflake guildId{};///< The guiild id for the guild which you wish to query the log of.
51 snowflake before{};///< Entries that preceded a specific audit log entry id.
52 snowflake userId{};///< The user_data for whom to look for the actions of.
53 int32_t limit{};///< The maximum number of actions to acquire from the log.
54 };
55
56 /// @brief For creating a guild.
59 default_message_notification_level defaultMessageNotifications{};///< Default message notification level.
60 explicit_content_filter_level explicitContentFilter{};///< Explicit content filter level.
61 jsonifier::vector<channel_data> channels{};///< Array of partial channel_data objects.
62 int32_t systemChannelFlags{};///< System channel_data flags.
63 snowflake systemChannelId{};///< The id of the channel_data where guild notices such as welcome messages and boost events are posted.
64 int32_t verificationLevel{};///< Verification level.
65 snowflake afkChannelId{};///< snowflake for afk channel_data.
66 jsonifier::string region{};///< The region that the servers are in.
67 jsonifier::string icon{};///< Base64 128x128 image for the guild icon.
68 jsonifier::string name{};///< The name of the new guild.
69 jsonifier::vector<role_data> roles{};///< Array of role_data objects.
70 };
71
72 /// @brief For getting a guild from the library's cache or a discord server.
74 snowflake guildId{};///< The id of the guild to acquire.
75 };
76
77 /// @brief For acquiring a guild preview of a chosen guild.
79 snowflake guildId{};///< The id of the guild's preview to acquire.
80 };
81
82 /// @brief For deleting a guild.
84 snowflake guildId{};///< The guild you would like to delete.
85 };
86
87 /// @brief For getting a list of guild bans.
89 snowflake guildId{};///< The guild from which to collect the list of bans.
90 snowflake before{};///< consider only users before given user id.
91 snowflake after{};///< consider only users after given user id null.
92 uint64_t limit{};///< Number of users to return ( up to maximum 1000 ).
93 };
94
95 /// @brief For getting a single guild ban.
97 snowflake guildId{};///< The guild from which to collect the ban from.
98 snowflake userId{};///< The user_data for whom to collect the ban of.
99 };
100
101 /// @brief For banning a current guild_member_data.
103 int32_t deleteMessageDays{};///< The number of days of their messages to delete.
104 snowflake guildMemberId{};///< The id of the member to be banned.
105 jsonifier::string reason{};///< The reason for the ban.
106 snowflake guildId{};///< The id of the guild from which to ban the member.
107 };
108
109 /// @brief For removing a previous created ban.
111 jsonifier::string reason{};///< The reason for removing this ban.
112 snowflake guildId{};///< The guild from which to erase the ban.
113 snowflake userId{};///< The user snowflake of the user who's ban to erase.
114 };
115
116 /// @brief For collecting the guild prune count.
118 jsonifier::vector<snowflake> includeRoles{};///< Roles to be included in the prune.
119 snowflake guildId{};///< The guild to be pruned.
120 int32_t days{};///< The number of days beyond which to prune the user's for inactivity.
121 };
122
123 /// @brief For pruning a number of guild_members from the guild.
125 jsonifier::vector<snowflake> includeRoles{};/// roles to be included in the prune.
126 bool computePruneCount{};/// whether 'pruned' is returned, discouraged for large guilds.
127 jsonifier::string reason{};///< Reason for pruning the guild_members.
128 snowflake guildId{};///< Guild within which to perform the prune.
129 int32_t days{};/// number of days after which to prune a given guild_member.
130 };
131
132 /// @brief For collecting a list of guild voice regions.
134 snowflake guildId{};///< The guild for which to collect the voice regions from.
135 };
136
137 /// @brief For geting all of the current invites from a guild.
139 snowflake guildId{};///< The id of the guild you wish to acquire.
140 };
141
142 /// @brief
143 struct get_guild_integrations_data {
144 snowflake guildId{};///< The guild for which to collect the integrations from.
145 };
146
147 /// @brief For deleting a guild integration.
149 snowflake integrationId{};///< The integration's id which we are going to delete.
150 jsonifier::string reason{};///< Reason for deleting the integration.
151 snowflake guildId{};///< The guild from which to delete the integration from.
152 };
153
154 /// @brief For collecting a guild's widget settings.
156 snowflake guildId{};///< The guild from which to collect the widget from.
157 };
158
159 /// @brief For modifying a guild's widget.
161 guild_widget_data widgetData{};///< The new guild widget responseData.
162 jsonifier::string reason{};///< Reason for modifying the widget.
163 snowflake guildId{};///< The guild for which to modify the widget of.
164 };
165
166 /// @brief For collecting a guild's widget.
168 snowflake guildId{};///< The guild from which to collect the widget from.
169 };
170
171 /// @brief For geting the vanity invite responseData of a guild.
173 snowflake guildId{};///< The id of the guild to acquire the vanity invite from.
174 };
175
176 /// @brief For collecting a guild's widget image.
178 widget_style_options widgetStlye{};///< The style of widget image to collect.
179 snowflake guildId{};///< The guild for which to collect the widget image from.
180 };
181
182 /// @brief For collecting a guild's welcome screen.
184 snowflake guildId{};///< The guild for which to collect the widget image from.
185 };
186
187 /// @brief For modifying a guild's welcome screen.
189 jsonifier::vector<welcome_screen_channel_data> welcomeChannels{};///< Welcome channels for the welcome screen.
190 jsonifier::string description{};///< The description of the welcome screen.
191 jsonifier::string reason{};///< The reason for modifying the welcome screen.
192 snowflake guildId{};///< The guild for which to modify the welcome screen of.
193 bool enabled{};///< Is it enabled?
194 };
195
196 /// @brief For collecting a guild's template.
198 jsonifier::string templateCode{};///< code for the desired template.
199 };
200
201 /// @brief For creating a guild from a guild template.
203 jsonifier::string templateCode{};///< code for the desired template to use.
204 jsonifier::string imageData{};///< Base64 128x128 image for the guild icon.
205 jsonifier::string name{};///< Desired name of the guild.
206 };
207
208 /// @brief For collecting a list of guild templates from a chosen guild.
210 snowflake guildId{};///< Guild from which you would like to collect the templates from.
211 };
212
213 /// @brief For creating a guild template.
215 jsonifier::string description{};///< Description for the template (0 - 120 characters).
216 snowflake guildId{};///< Guild within which you wuold like to create the template.
217 jsonifier::string name{};///< Name of the template (1 - 100 characters).
218 };
219
220 /// @brief For syncing a guild template.
222 jsonifier::string templateCode{};///< Template code for which template you would like to sync.
223 snowflake guildId{};///< Guild for which you would like to sync the template of.
224 };
225
226 /// @brief For modifying a guild template.
228 jsonifier::string templateCode{};/// template which you would like to modify.
229 jsonifier::string description{};///< Description for the template (0 - 120 characters).
230 snowflake guildId{};///< Guild within which you would like to modify the template.
231 jsonifier::string name{};///< Name of the template (1 - 100 characters).
232 };
233
234 /// @brief For deleting a guild template.
236 jsonifier::string templateCode{};///< The template which you would like to delete.
237 snowflake guildId{};///< The guild within which you would like to delete the template.
238 };
239
240 /// @brief For geting a single invite's responseData from a guild.
242 snowflake guildScheduledEventId{};///< The guild scheduled event to include with the invite.
243 bool withExpiration{};///< collect expiration time/date?
244 snowflake inviteId{};///< The id of the invite you wish to acquire.
245 bool withCount{};///< collect usage etc counts?
246 };
247
248 /// @brief For deleting a single guild invite.
250 jsonifier::string reason{};///< Reason for deleting the invite.
251 snowflake inviteId{};///< The invite which you would like to delete.
252 };
253
254 /// @brief For collecting a list of guild's that the bot is in.
256 snowflake before{};///< Get guilds before this guild id.
257 snowflake after{};///< Get guilds after this guild id.
258 uint32_t limit{};///< Max number of guilds to return (1 - 200).
259 };
260
261 /// @brief For leaving a particular guild.
263 snowflake guildId{};///< The id of the guild you would like the bot to leave.
264 };
265
266 /// @brief For modifying the properties of a chosen guild.
267 struct DiscordCoreAPI_Dll modify_guild_data {
268 default_message_notification_level defaultMessageNotifications{};///< Default message notification level.
269 explicit_content_filter_level explicitContentFilter{};///< Explicit content filter level.
270 system_channel_flags systemChannelFlags{};///< System channel_data flags.
271 verification_level verificationLevel{};///< Verification level.
272 jsonifier::vector<jsonifier::string> features{};///< Array of guild feature strings enabled guild features.
273 snowflake publicUpdatesChannelId{};///< The id of the channel_data where admins and moderators of community guilds receive notices from discord.
274 afk_time_out_durations afkTimeout{};///< Afk timeout in seconds.
275 bool premiumProgressBarEnabled{};///< Whether or not the progress bar is enabled.
276 jsonifier::string preferredLocale{};///< The preferred locale of a community guild used in server discovery.
277 jsonifier::string discoverySplash{};/// base64 16 : 9 png / jpeg image for the guild discovery splash(when the server has the discoverable feature).
278 snowflake systemChannelId{};///< The id of the channel_data where guild notices such as welcome messages and boost events are posted.
279 snowflake rulesChannelId{};///< The id of the channel_data where community guilds display rules and /or guidelines.
280 jsonifier::string description{};///< The description for the guild, if the guild is discoverable.
281 snowflake afkChannelId{};///< snowflake for afk channels.
282 jsonifier::string banner{};///< Base64 16 : 9 png / jpeg image for the guild banner (when the server has the banner feature).
283 jsonifier::string splash{};///< Base64 16 : 9 png / jpeg image for the guild splash (when the server has the INVITE_SPLASH feature).
284 jsonifier::string reason{};///< Reason for modifying the guild.
285 snowflake ownerId{};///< User_data id to transfer guild ownership to (must be owner).
286 snowflake guildId{};///< snowflake of the chosen guild to modify.
287 jsonifier::string icon{};///< Base64 1024x1024 png / jpeg / gif image for the guild icon.
288 jsonifier::string name{};///< Desired name of the guild.
289
290 modify_guild_data(const guild_data dataPackage);
291 };
292
293 /**@}*/
294
295 DCA_INLINE stop_watch<milliseconds> stopWatchNew{ milliseconds{ 100 } };
296
297 /**
298 * \addtogroup main_endpoints
299 * @{
300 */
301
302 /// @brief An interface class for the guild_data related discord endpoints.
303 class DiscordCoreAPI_Dll guilds {
304 public:
305 static void initialize(discord_core_internal::https_client* client, config_manager* configManager);
306
307 /// @brief Gets an audit log from the discord servers.
308 /// @param dataPackage a get_guild_audit_logs_data structure.
309 /// @return A co_routine containing an audit_log_data.
310 static co_routine<audit_log_data> getGuildAuditLogsAsync(get_guild_audit_logs_data dataPackage);
311
312 /// @brief Creates a new guild.
313 /// @param dataPackage a create_guild_data structure.
314 /// @return A co_routine containing a guild.
315 static co_routine<guild_data> createGuildAsync(create_guild_data dataPackage);
316
317 /// @brief Returns all of the guilds that the current bot is in.
318 /// @return A co_routine containing a jsonifier::vector<guild_data>.
319 static jsonifier::vector<guild_data> getAllGuildsAsync();
320
321 /// @brief Collects a guild from the discord servers.
322 /// @param dataPackage a get_guild_data structure.
323 /// @return A co_routine containing a guild.
324 static co_routine<guild_data> getGuildAsync(get_guild_data dataPackage);
325
326 /// @brief Collects a guild from the library's cache.
327 /// @param dataPackage a get_guild_data structure.
328 /// @return A co_routine containing a guild.
329 static guild_cache_data getCachedGuild(get_guild_data dataPackage);
330
331 /// @brief Acquires the preview data of a chosen guild.
332 /// @param dataPackage a get_guild_preview_data structure.
333 /// @return A co_routine containing a guild_preview_data.
334 static co_routine<guild_preview_data> getGuildPreviewAsync(get_guild_preview_data dataPackage);
335
336 /// @brief Modifies a chosen guild's properties.
337 /// @param dataPackage a modify_guild_data structure.
338 /// @return A co_routine containing a guild.
339 static co_routine<guild_data> modifyGuildAsync(modify_guild_data dataPackage);
340
341 /// @brief Deletes a chosen guild.
342 /// @param dataPackage a delete_guild_data structure.
343 /// @return A co_routine containing void.
344 static co_routine<void> deleteGuildAsync(delete_guild_data dataPackage);
345
346 /// @brief Collects a list of bans from a chosen guild.
347 /// @param dataPackage a get_guild_bans_data structure.
348 /// @return A co_routine containing a ban_data_vector.
349 static co_routine<jsonifier::vector<ban_data>> getGuildBansAsync(get_guild_bans_data dataPackage);
350
351 /// @brief Collects a single ban from a chosen guild.
352 /// @param dataPackage a get_guild_ban_data structure.
353 /// @return A co_routine containing a ban_data.
354 static co_routine<ban_data> getGuildBanAsync(get_guild_ban_data dataPackage);
355
356 /// @brief Bans a guild_member.
357 /// @param dataPackage a create_guild_ban_data structure.
358 /// @return A co_routine containing a ban_data.
359 static co_routine<void> createGuildBanAsync(create_guild_ban_data dataPackage);
360
361 /// @brief Removes a previously created ban.
362 /// @param dataPackage a remove_guild_ban_data structure.
363 /// @return A co_routine containing void.
364 static co_routine<void> removeGuildBanAsync(remove_guild_ban_data dataPackage);
365
366 /// @brief For collecting the guild prune count.
367 /// @param dataPackage a get_guild_prune_count_data structure.
368 /// @return A co_routine containing guild_prune_count_data.
369 static co_routine<guild_prune_count_data> getGuildPruneCountAsync(get_guild_prune_count_data dataPackage);
370
371 /// @brief For performing a pruning of the guild_members of the guild, based on days of inactivity.
372 /// @param dataPackage a begin_guild_prune_data structure.
373 /// @return A co_routine containing a guild_prune_count_data.
374 static co_routine<guild_prune_count_data> beginGuildPruneAsync(begin_guild_prune_data dataPackage);
375
376 /// @brief Gets the list of voice regions for a particular server.
377 /// @param dataPackage a get_guild_voice_regions_data structure.
378 /// @return A co_routine containing a voice_region_data_vector.
379 static co_routine<jsonifier::vector<voice_region_data>> getGuildVoiceRegionsAsync(get_guild_voice_regions_data dataPackage);
380
381 /// @brief Gets multiple invites from the discord servers.
382 /// @param dataPackage a get_guild_invites_data structure.
383 /// @return A co_routine containing a jsonifier::vector<invite_data>.
384 static co_routine<jsonifier::vector<invite_data>> getGuildInvitesAsync(get_guild_invites_data dataPackage);
385
386 /// @brief Gets the list of guild integrations for a particular server.
387 /// @param dataPackage a get_guild_integrations_data structure.
388 /// @return A co_routine containing a jsonifier::vector<integration_data>.
389 static co_routine<jsonifier::vector<integration_data>> getGuildIntegrationsAsync(get_guild_integrations_data dataPackage);
390
391 /// @brief Deletes an integration from a guild.
392 /// @param dataPackage a delete_guild_integration_data structure.
393 /// @return A co_routine containing void.
394 static co_routine<void> deleteGuildIntegrationAsync(delete_guild_integration_data dataPackage);
395
396 /// @brief Gets the guild widget's settings for a particular server.
397 /// @param dataPackage a get_guild_widget_settings_data structure.
398 /// @return A co_routine containing a guild_widget_data.
399 static co_routine<guild_widget_data> getGuildWidgetSettingsAsync(get_guild_widget_settings_data dataPackage);
400
401 /// @brief Modifies the guild widget for a particular server.
402 /// @param dataPackage a modify_guild_widget_data structure.
403 /// @return A co_routine containing a guild_widget_data.
404 static co_routine<guild_widget_data> modifyGuildWidgetAsync(modify_guild_widget_data dataPackage);
405
406 /// @brief Gets the guild widget for a particular server.
407 /// @param dataPackage a get_guild_widget_data structure.
408 /// @return A co_routine containing a guild_widget_data.
409 static co_routine<guild_widget_data> getGuildWidgetAsync(get_guild_widget_data dataPackage);
410
411 /// @brief Gets the vanity invite responseData from a particular server.
412 /// @param dataPackage a get_guild_vanity_invite_data structure.
413 /// @return A co_routine containing invite_data.
414 static co_routine<invite_data> getGuildVanityInviteAsync(get_guild_vanity_invite_data dataPackage);
415
416 /// @brief Gets the guild widget image for a particular server.
417 /// @param dataPackage a get_guild_widget_image_data structure.
418 /// @return A co_routine containing a guild_widget_image_data.
419 static co_routine<guild_widget_image_data> getGuildWidgetImageAsync(get_guild_widget_image_data dataPackage);
420
421 /// @brief Gets the guild welcome screen for a particular server.
422 /// @param dataPackage a get_guild_welcome_screen_data structure.
423 /// @return A co_routine containing a welcome_screen_data.
424 static co_routine<welcome_screen_data> getGuildWelcomeScreenAsync(get_guild_welcome_screen_data dataPackage);
425
426 /// @brief Modifies the guild welcome screen.
427 /// @param dataPackage a modify_guild_welcome_screen_data structure.
428 /// @return A co_routine containing a welcome_screen_data.
429 static co_routine<welcome_screen_data> modifyGuildWelcomeScreenAsync(modify_guild_welcome_screen_data dataPackage);
430
431 /// @brief Gets the guild template from a particular server.
432 /// @param dataPackage a get_guild_template_data structure.
433 /// @return A co_routine containing a guild_template_data.
434 static co_routine<guild_template_data> getGuildTemplateAsync(get_guild_template_data dataPackage);
435
436 /// @brief Creates a guild from the guild template.
437 /// @param dataPackage a create_guild_from_guild_template_data structure.
438 /// @return A co_routine containing a guild.
439 static co_routine<guild_data> createGuildFromGuildTemplateAsync(create_guild_from_guild_template_data dataPackage);
440
441 /// @brief Collects a list of guild templates from a chosen guild.
442 /// @param dataPackage a get_guild_templates_data structure.
443 /// @return A co_routine containing a guiild_template_data_vector.
444 static co_routine<jsonifier::vector<guild_template_data>> getGuildTemplatesAsync(get_guild_templates_data dataPackage);
445
446 /// @brief Creates a guild template.
447 /// @param dataPackage a create_guild_template_data structure.
448 /// @return A co_routine containing a guiild_template_data.
449 static co_routine<guild_template_data> createGuildTemplateAsync(create_guild_template_data dataPackage);
450
451 /// @brief Syncs a guild template.
452 /// @param dataPackage a sync_guild_template_data structure.
453 /// @return A co_routine containing a guiild_template_data.
454 static co_routine<guild_template_data> syncGuildTemplateAsync(sync_guild_template_data dataPackage);
455
456 /// @brief Modifies a guild template.
457 /// @param dataPackage a modify_guild_template_data structure.
458 /// @return A co_routine containing a guiild_template_data.
459 static co_routine<guild_template_data> modifyGuildTemplateAsync(modify_guild_template_data dataPackage);
460
461 /// @brief Deletes a guild template.
462 /// @param dataPackage a delete_guild_template_data structure.
463 /// @return A co_routine containing a void.
464 static co_routine<void> deleteGuildTemplateAsync(delete_guild_template_data dataPackage);
465
466 /// @brief Gets an invite from the discord servers.
467 /// @param dataPackage a get_invite_data structure.
468 /// @return A co_routine containing an invite_data.
469 static co_routine<invite_data> getInviteAsync(get_invite_data dataPackage);
470
471 /// @brief Deletes an invite from the discord servers
472 /// @param dataPackage a delete_invite_data structure.
473 /// @return A co_routine containing void.
474 static co_routine<void> deleteInviteAsync(delete_invite_data dataPackage);
475
476 /// @brief Collects a list of guilds that the bot is in.
477 /// @param dataPackage a get_current_user_guilds_data structure.
478 /// @return A co_routine containing a guild_vector.
479 static co_routine<jsonifier::vector<guild_data>> getCurrentUserGuildsAsync(get_current_user_guilds_data dataPackage);
480
481 /// @brief Removes the bot from a chosen guild.
482 /// @param dataPackage a leave_guild_data structure.
483 /// @return A co_routine containing void.
484 static co_routine<void> leaveGuildAsync(leave_guild_data dataPackage);
485
486 template<typename guild_type> DCA_INLINE static void insertGuild(guild_type&& guild) {
487 if (doWeCacheGuildsBool) {
488 if (guild.id == 0) {
489 throw dca_exception{ "Sorry, but there was no id set for that guild." };
490 }
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;
494 }
495 }
496 }
497
498 static object_cache<guild_cache_data>& getCache();
499
500 static void removeGuild(const guild_cache_data& guild_id);
501
502 static bool doWeCacheGuilds();
503
504 protected:
505 static discord_core_internal::https_client* httpsClient;
506 static object_cache<guild_cache_data> cache;
507 static bool doWeCacheGuildsBool;
508 };
509 /**@}*/
510}
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.
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.
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.
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 collecting a guild's widget.
snowflake guildId
The guild from which to collect the widget from.
For collecting a guild's widget image.
widget_style_options widgetStlye
The style of widget image to collect.
snowflake guildId
The guild for which to collect the widget image from.
For collecting a guild's widget settings.
snowflake guildId
The guild from which to collect the widget 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.
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.
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 modifying a guild's widget.
guild_widget_data widgetData
The new guild widget responseData.
jsonifier::string reason
Reason for modifying the widget.
snowflake guildId
The guild for which to modify the widget of.
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.
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.