39 static constexpr auto parseValue = object(
"default_message_notifications", &ValueType::defaultMessageNotifications,
"explicit_content_filter",
40 &ValueType::explicitContentFilter,
"system_channel_flags", &ValueType::systemChannelFlags,
"verification_level",
41 &ValueType::verificationLevel,
"afk_timeout", &ValueType::afkTimeout,
"region", &ValueType::region,
"name", &ValueType::name,
"icon",
42 "channels", &ValueType::channels,
"system_channel_id", &ValueType::systemChannelId,
"roles", &ValueType::roles,
"afk_channel_id",
43 &ValueType::afkChannelId);
48 static constexpr auto parseValue = object(
"default_message_notifications", &ValueType::defaultMessageNotifications,
"explicit_content_filter",
49 &ValueType::explicitContentFilter,
"system_channel_flags", &ValueType::systemChannelFlags,
"verification_level",
50 &ValueType::verificationLevel,
"features", &ValueType::features,
"public_updates_channel_id", &ValueType::publicUpdatesChannelId,
51 "afk_timeout", &ValueType::afkTimeout,
"preferred_locale", &ValueType::preferredLocale,
"discovery_splash", &ValueType::discoverySplash,
52 "system_channel_id", &ValueType::systemChannelId,
"rules_channel_id", &ValueType::rulesChannelId,
"description", &ValueType::description,
53 "afk_channel_id", &ValueType::afkChannelId,
"banner", &ValueType::banner,
"splash", &ValueType::splash,
"reason", &ValueType::reason,
54 "owner_id", &ValueType::ownerId,
"guild_id", &ValueType::guildId,
"icon", &ValueType::icon,
"name", &ValueType::name);
59 static constexpr auto parseValue = object(
"delete_message_days", &ValueType::deleteMessageDays,
"member", &ValueType::guildMemberId,
"reason",
60 &ValueType::reason,
"guild_id", &ValueType::guildId);
63 template<>
struct Core<
DiscordCoreAPI::ModifyGuildWelcomeScreenData> {
65 static constexpr auto parseValue = object(
"welcome_channels", &ValueType::welcomeChannels,
"description", &ValueType::description,
"guild_id",
66 &ValueType::guildId,
"enabled", &ValueType::enabled,
"reason", &ValueType::reason);
71 static constexpr auto parseValue =
72 object(
"include_roles", &ValueType::includeRoles,
"guild_id", &ValueType::guildId,
"days", &ValueType::days);
77 static constexpr auto parseValue = object(
"include_roles", &ValueType::includeRoles,
"compute_prune_count", &ValueType::computePruneCount,
78 "reason", &ValueType::reason,
"guild_id", &ValueType::guildId,
"days", &ValueType::days);
83 static constexpr auto parseValue = object(
"template_code", &ValueType::templateCode,
"description", &ValueType::description,
"guild_id",
84 &ValueType::guildId,
"name", &ValueType::name);
89 static constexpr auto parseValue = object(
"description", &ValueType::description,
"guild_id", &ValueType::guildId,
"name", &ValueType::name);
92 template<>
struct Core<
DiscordCoreAPI::CreateGuildFromGuildTemplateData> {
94 static constexpr auto parseValue =
95 object(
"template_code", &ValueType::templateCode,
"image_data", &ValueType::imageData,
"name", &ValueType::name);
100 static constexpr auto parseValue =
101 object(
"widget_data", &ValueType::widgetData,
"reason", &ValueType::reason,
"guild_id", &ValueType::guildId);
109 Guild& Guild::operator=(GuildData&& other)
noexcept {
110 if (
this != &other) {
111 voiceConnectionPtr = other.voiceConnectionPtr;
112 discordCoreClient = other.discordCoreClient;
113 for (
auto& value: other.channels) {
116 channels.emplace_back(std::move(data));
118 for (
auto& value: other.members) {
121 data.user.id = value;
122 members.emplace_back(std::move(data));
124 for (
auto& value: other.roles) {
127 roles.emplace_back(std::move(data));
129 for (
auto& value: other.emoji) {
132 emoji.emplace_back(std::move(data));
134 for (
auto& value: other.guildScheduledEvents) {
135 GuildScheduledEvent data{};
137 guildScheduledEvents.emplace_back(std::move(data));
139 for (
auto& value: other.presences) {
140 PresenceUpdateData data{};
141 data.user.id = value.user.id;
142 presences.emplace(data.user.id, std::move(data));
144 for (
auto& value: other.stageInstances) {
145 StageInstance data{};
147 stageInstances.emplace_back(std::move(data));
149 for (
auto& value: other.stickers) {
152 stickers.emplace_back(std::move(data));
154 for (
auto& value: other.threads) {
157 threads.emplace_back(std::move(data));
159 joinedAt = std::move(other.joinedAt);
160 ownerId = std::move(other.ownerId);
161 memberCount = other.memberCount;
162 icon = std::move(other.icon);
163 name = std::move(other.name);
170 Guild::Guild(GuildData&& other)
noexcept {
171 *
this = std::move(other);
174 Guild& Guild::operator=(
const GuildData& other)
noexcept {
175 if (
this != &other) {
176 voiceConnectionPtr = other.voiceConnectionPtr;
177 discordCoreClient = other.discordCoreClient;
178 for (
auto& value: other.channels) {
181 channels.emplace_back(data);
183 for (
auto& value: other.members) {
186 data.user.id = value;
187 members.emplace_back(data);
189 for (
auto& value: other.roles) {
192 roles.emplace_back(data);
194 for (
auto& value: other.emoji) {
197 emoji.emplace_back(data);
199 for (
auto& value: other.guildScheduledEvents) {
200 GuildScheduledEvent data{};
202 guildScheduledEvents.emplace_back(data);
204 for (
auto& value: other.presences) {
205 PresenceUpdateData data{};
206 data.user.id = value.user.id;
207 presences.emplace(data.user.id, data);
209 for (
auto& value: other.stageInstances) {
210 StageInstance data{};
212 stageInstances.emplace_back(data);
214 for (
auto& value: other.stickers) {
217 stickers.emplace_back(data);
219 for (
auto& value: other.threads) {
222 threads.emplace_back(data);
224 memberCount = other.memberCount;
225 joinedAt = other.joinedAt;
226 ownerId = other.ownerId;
235 Guild::Guild(
const GuildData& other)
noexcept {
239 GuildData& GuildData::operator=(GuildCacheData&& other)
noexcept {
240 voiceConnectionPtr = other.voiceConnectionPtr;
241 discordCoreClient = other.discordCoreClient;
242 for (
auto& value: other.voiceStates) {
243 voiceStates.emplace_back(std::move(value.id));
245 for (
auto& value: other.channels) {
248 channels.emplace_back(std::move(data));
250 for (
auto& value: other.members) {
251 members.emplace_back(std::move(value.user.id));
253 for (
auto& value: other.roles) {
256 roles.emplace_back(std::move(data));
258 for (
auto& value: other.emoji) {
261 emoji.emplace_back(std::move(data));
263 for (
auto& value: other.guildScheduledEvents) {
266 guildScheduledEvents.emplace_back(std::move(data));
268 for (
auto& value: other.presences) {
269 PresenceUpdateData data{};
270 data.user.id = value.user.id;
271 presences.emplace_back(std::move(data));
273 for (
auto& value: other.stageInstances) {
276 stageInstances.emplace_back(std::move(data));
278 for (
auto& value: other.stickers) {
281 stickers.emplace_back(std::move(data));
283 for (
auto& value: other.threads) {
286 threads.emplace_back(std::move(data));
288 joinedAt = std::move(other.joinedAt);
289 ownerId = std::move(other.ownerId);
290 memberCount = other.memberCount;
291 icon = std::move(other.icon);
292 name = std::move(other.name);
298 GuildData::GuildData(GuildCacheData&& other)
noexcept {
299 *
this = std::move(other);
302 GuildData& GuildData::operator=(
const GuildCacheData& other)
noexcept {
303 voiceConnectionPtr = other.voiceConnectionPtr;
304 discordCoreClient = other.discordCoreClient;
305 for (
auto& value: other.voiceStates) {
306 voiceStates.emplace_back(std::move(value.id));
308 for (
auto& value: other.channels) {
311 channels.emplace_back(std::move(data));
313 for (
auto& value: other.members) {
314 members.emplace_back(std::move(value.user.id));
316 for (
auto& value: other.roles) {
319 roles.emplace_back(data);
321 for (
auto& value: other.emoji) {
324 emoji.emplace_back(data);
326 for (
auto& value: other.guildScheduledEvents) {
329 guildScheduledEvents.emplace_back(data);
331 for (
auto& value: other.presences) {
332 PresenceUpdateData data{};
333 data.user.id = value.user.id;
334 presences.emplace_back(data);
336 for (
auto& value: other.stageInstances) {
339 stageInstances.emplace_back(data);
341 for (
auto& value: other.stickers) {
344 stickers.emplace_back(data);
346 for (
auto& value: other.threads) {
349 threads.emplace_back(data);
351 joinedAt = other.joinedAt;
352 ownerId = other.ownerId;
353 memberCount = other.memberCount;
361 GuildData::GuildData(
const GuildCacheData& other)
noexcept {
365 std::string Guild::getDiscoverySplashUrl() noexcept {
366 std::string stringNew{
"https://cdn.discordapp.com/" };
367 stringNew +=
"discovery-splashes/" +
id +
"/" +
discoverySplash.operator std::string() +
".png";
371 std::string Guild::getBannerUrl() noexcept {
372 std::string stringNew{
"https://cdn.discordapp.com/" };
373 stringNew +=
"banners/" +
id +
"/" +
banner.operator std::string() +
".png";
377 std::string Guild::getSplashUrl() noexcept {
378 std::string stringNew{
"https://cdn.discordapp.com/" };
379 stringNew +=
"splashes/" +
id +
"/" +
splash.operator std::string() +
".png";
383 ModifyGuildData::ModifyGuildData(Guild dataPackage) {
396 for (
auto& value: dataPackage.features) {
401 name = dataPackage.name;
404 void Guilds::initialize(DiscordCoreInternal::HttpsClient* client, DiscordCoreClient* discordCoreClientNew, ConfigManager* configManagerNew) {
405 Guilds::doWeCacheGuildsBool = configManagerNew->doWeCacheGuilds();
406 Guilds::discordCoreClient = discordCoreClientNew;
407 Guilds::httpsClient = client;
411 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Audit_Logs };
412 co_await NewThreadAwaitable<AuditLogData>();
413 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
414 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/audit-logs";
415 if (dataPackage.
userId != 0) {
416 workload.relativePath +=
"?user_id=" + dataPackage.
userId;
417 if (std::to_string(
static_cast<int32_t
>(dataPackage.
actionType)) !=
"") {
418 workload.relativePath +=
"&action_type=" + std::to_string(
static_cast<int32_t
>(dataPackage.
actionType));
420 if (dataPackage.
limit != 0) {
421 workload.relativePath +=
"&limit=" + std::to_string(dataPackage.
limit);
423 if (dataPackage.
before != 0) {
424 workload.relativePath +=
"&before=" + dataPackage.
before;
426 }
else if (std::to_string(
static_cast<int32_t
>(dataPackage.
actionType)) !=
"") {
427 workload.relativePath +=
"?action_type=" + std::to_string(
static_cast<int32_t
>(dataPackage.
actionType));
428 if (dataPackage.
limit != 0) {
429 workload.relativePath +=
"&limit=" + std::to_string(dataPackage.
limit);
431 if (dataPackage.
before != 0) {
432 workload.relativePath +=
"&before=" + dataPackage.
before;
434 }
else if (dataPackage.
limit != 0) {
435 workload.relativePath +=
"?limit=" + std::to_string(dataPackage.
limit);
436 if (dataPackage.
before != 0) {
437 workload.relativePath +=
"&before=" + dataPackage.
before;
439 }
else if (dataPackage.
before != 0) {
440 workload.relativePath +=
"?before=" + dataPackage.
before;
442 workload.callStack =
"Guilds::getAuditLogDataAsync()";
444 Guilds::httpsClient->submitWorkloadAndGetResult<
AuditLogData>(workload, returnData);
445 co_return returnData;
449 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Post_Guild };
450 co_await NewThreadAwaitable<Guild>();
451 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Post;
452 workload.relativePath =
"/guilds";
453 Jsonifier::JsonifierCore parser{};
454 parser.serializeJson(dataPackage, workload.content);
455 workload.callStack =
"Guilds::createGuildAsync()";
457 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildData>(workload, returnData);
459 co_return returnData;
463 co_await NewThreadAwaitable<GuildDataVector>();
464 GuildDataVector guildVector{};
465 for (
auto& value: Guilds::getCache()) {
466 value.discordCoreClient = Guilds::discordCoreClient;
467 guildVector.emplace_back(value);
469 co_return guildVector;
473 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild };
474 co_await NewThreadAwaitable<Guild>();
475 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
476 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"?with_counts=true";
477 workload.callStack =
"Guilds::getGuildAsync()";
479 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildData>(workload, data);
480 if (Guilds::getCache().contains(dataPackage.
guildId)) {
481 data = Guilds::getCache().find(dataPackage.
guildId);
483 Guilds::insertGuild(std::move(data));
485 data.discordCoreClient = Guilds::discordCoreClient;
492 if (!Guilds::getCache().contains(dataPackage.
guildId)) {
494 guild.discordCoreClient = Guilds::discordCoreClient;
497 return Guilds::getCache().find(dataPackage.
guildId);
502 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Preview };
503 co_await NewThreadAwaitable<GuildPreviewData>();
504 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
505 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/preview";
506 workload.callStack =
"Guilds::getGuildPreviewAsync()";
508 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildPreviewData>(workload, returnData);
509 co_return returnData;
513 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Patch_Guild };
514 co_await NewThreadAwaitable<Guild>();
515 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Patch;
516 workload.relativePath =
"/guilds/" + dataPackage.
guildId;
517 Jsonifier::JsonifierCore parser{};
518 parser.serializeJson(dataPackage, workload.content);
519 workload.callStack =
"Guilds::modifyGuildAsync()";
520 if (dataPackage.
reason !=
"") {
521 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
524 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildData>(workload, data);
526 if (Guilds::getCache().contains(dataPackage.
guildId)) {
527 data = Guilds::getCache().find(dataPackage.
guildId);
529 Guilds::insertGuild(std::move(data));
535 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Delete_Guild };
536 co_await NewThreadAwaitable<void>();
537 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Delete;
538 workload.relativePath =
"/guilds/" + dataPackage.
guildId;
539 workload.callStack =
"Guilds::deleteGuildAsync()";
540 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
545 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Bans };
546 co_await NewThreadAwaitable<std::vector<BanData>>();
547 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
548 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/bans";
549 if (dataPackage.
after != 0) {
550 workload.relativePath +=
"?after=" + dataPackage.
after;
551 if (dataPackage.
before != 0) {
552 workload.relativePath +=
"&before=" + dataPackage.
before;
554 if (dataPackage.
limit != 0) {
555 workload.relativePath +=
"&limit=" + std::to_string(dataPackage.
limit);
557 }
else if (dataPackage.
before != 0) {
558 workload.relativePath +=
"?before=" + dataPackage.
before;
559 if (dataPackage.
limit != 0) {
560 workload.relativePath +=
"&limit=" + std::to_string(dataPackage.
limit);
562 }
else if (dataPackage.
limit != 0) {
563 workload.relativePath +=
"?limit=" + std::to_string(dataPackage.
limit);
565 workload.callStack =
"Guilds::getGuildBansAsync()";
566 BanDataVector returnData{};
567 Guilds::httpsClient->submitWorkloadAndGetResult<BanDataVector>(workload, returnData);
568 co_return returnData;
572 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Ban };
573 co_await NewThreadAwaitable<BanData>();
574 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
575 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/bans/" + dataPackage.
userId;
576 workload.callStack =
"Guilds::getGuildBanAsync()";
578 Guilds::httpsClient->submitWorkloadAndGetResult<
BanData>(workload, data);
583 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Put_Guild_Ban };
584 co_await NewThreadAwaitable<void>();
585 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Put;
586 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/bans/" + dataPackage.
guildMemberId;
587 Jsonifier::JsonifierCore parser{};
588 parser.serializeJson(dataPackage, workload.content);
589 workload.callStack =
"Guilds::createGuildBanAsync()";
590 if (dataPackage.
reason !=
"") {
591 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
593 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
598 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Delete_Guild_Ban };
599 co_await NewThreadAwaitable<void>();
600 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Delete;
601 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/bans/" + dataPackage.
userId;
602 workload.callStack =
"Guilds::removeGuildBanAsync()";
603 if (dataPackage.
reason !=
"") {
604 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
606 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
611 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Prune_Count };
612 co_await NewThreadAwaitable<GuildPruneCountData>();
613 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
614 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/prune";
615 workload.callStack =
"Guilds::getGuildPruneCountAsync()";
616 if (dataPackage.
days != 0) {
617 workload.relativePath +=
"?days=" + std::to_string(dataPackage.
days);
619 workload.relativePath +=
"&include_roles=";
620 for (int32_t x = 0; x < dataPackage.
includeRoles.size(); ++x) {
623 workload.relativePath +=
",";
628 workload.relativePath +=
"?include_roles=";
629 for (int32_t x = 0; x < dataPackage.
includeRoles.size(); ++x) {
632 workload.relativePath +=
",";
637 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildPruneCountData>(workload, returnData);
638 co_return returnData;
642 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Post_Guild_Prune };
643 co_await NewThreadAwaitable<GuildPruneCountData>();
644 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Post;
645 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/prune";
646 Jsonifier::JsonifierCore parser{};
647 parser.serializeJson(dataPackage, workload.content);
648 workload.callStack =
"Guilds::beginGuildPruneAsync()";
649 if (dataPackage.
reason !=
"") {
650 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
653 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildPruneCountData>(workload, returnData);
654 co_return returnData;
658 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Voice_Regions };
659 co_await NewThreadAwaitable<std::vector<VoiceRegionData>>();
660 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
661 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/regions";
662 workload.callStack =
"Guilds::getGuildVoiceRegionsAsync()";
663 VoiceRegionDataVector returnData{};
664 Guilds::httpsClient->submitWorkloadAndGetResult<VoiceRegionDataVector>(workload, returnData);
665 co_return returnData;
669 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Invites };
670 co_await NewThreadAwaitable<std::vector<InviteData>>();
671 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
672 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/invites";
673 workload.callStack =
"Guilds::getGuildInvitesAsync()";
674 InviteDataVector returnData{};
675 Guilds::httpsClient->submitWorkloadAndGetResult<InviteDataVector>(workload, returnData);
676 co_return returnData;
680 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Integrations };
681 co_await NewThreadAwaitable<std::vector<IntegrationData>>();
682 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
683 workload.relativePath =
"/guilds/" + dataPackage.guildId +
"/integrations";
684 workload.callStack =
"Guilds::getGuildIntegrationsAsync()";
685 IntegrationDataVector returnData{};
686 Guilds::httpsClient->submitWorkloadAndGetResult<IntegrationDataVector>(workload, returnData);
687 co_return returnData;
691 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Delete_Guild_Integration };
692 co_await NewThreadAwaitable<void>();
693 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Delete;
694 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/integrations/" + dataPackage.
integrationId;
695 workload.callStack =
"Guilds::deleteGuildIntegrationAsync()";
696 if (dataPackage.
reason !=
"") {
697 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
699 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
704 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Widget_Settings };
705 co_await NewThreadAwaitable<GuildWidgetData>();
706 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
707 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/widget";
708 workload.callStack =
"Guilds::getGuildWidgetSettingsAsync()";
710 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildWidgetData>(workload, returnData);
711 co_return returnData;
715 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Patch_Guild_Widget };
716 co_await NewThreadAwaitable<GuildWidgetData>();
717 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Patch;
718 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/widget";
719 Jsonifier::JsonifierCore parser{};
720 parser.serializeJson(dataPackage, workload.content);
721 workload.callStack =
"Guilds::modifyGuildWidgetAsync()";
722 if (dataPackage.
reason !=
"") {
723 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
726 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildWidgetData>(workload, returnData);
727 co_return returnData;
731 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Widget };
732 co_await NewThreadAwaitable<GuildWidgetData>();
733 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
734 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/widget.json";
735 workload.callStack =
"Guilds::getGuildWidgetAsync()";
737 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildWidgetData>(workload, returnData);
738 co_return returnData;
742 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Vanity_Invite };
743 co_await NewThreadAwaitable<InviteData>();
744 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
745 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/vanity-url";
746 workload.callStack =
"Guilds::getGuildVanityInviteAsync()";
748 Guilds::httpsClient->submitWorkloadAndGetResult<
InviteData>(workload, returnData);
749 co_return returnData;
753 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Widget_Image };
754 co_await NewThreadAwaitable<GuildWidgetImageData>();
755 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
756 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/widget.png";
759 workload.relativePath +=
"?style=shield";
763 workload.relativePath +=
"?style=banner1";
767 workload.relativePath +=
"?style=banner2";
771 workload.relativePath +=
"?style=banner3";
775 workload.relativePath +=
"?style=banner4";
779 workload.callStack =
"Guilds::getGuildWidgetImageAsync()";
782 co_return returnData;
786 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Welcome_Screen };
787 co_await NewThreadAwaitable<WelcomeScreenData>();
788 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
789 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/welcome-screen";
790 workload.callStack =
"Guilds::getGuildWelcomeScreenAsync()";
792 Guilds::httpsClient->submitWorkloadAndGetResult<
WelcomeScreenData>(workload, returnData);
793 co_return returnData;
797 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Patch_Guild_Welcome_Screen };
798 co_await NewThreadAwaitable<WelcomeScreenData>();
799 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Patch;
800 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/welcome-screen";
801 Jsonifier::JsonifierCore parser{};
802 parser.serializeJson(dataPackage, workload.content);
803 workload.callStack =
"Guilds::modifyGuildWelcomeScreenAsync()";
804 if (dataPackage.
reason !=
"") {
805 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
808 Guilds::httpsClient->submitWorkloadAndGetResult<
WelcomeScreenData>(workload, returnData);
809 co_return returnData;
813 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Template };
814 co_await NewThreadAwaitable<GuildTemplateData>();
815 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
816 workload.relativePath =
"/guilds/templates/" + dataPackage.
templateCode;
817 workload.callStack =
"Guilds::getGuildTemplateAsync()";
819 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildTemplateData>(workload, returnData);
820 co_return returnData;
824 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Post_Guild_From_Guild_Template };
825 co_await NewThreadAwaitable<Guild>();
826 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Post;
827 workload.relativePath =
"/guilds/templates/" + dataPackage.
templateCode;
828 Jsonifier::JsonifierCore parser{};
829 parser.serializeJson(dataPackage, workload.content);
830 workload.callStack =
"Guilds::createGuildFromGuildTemplateAsync()";
832 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildData>(workload, returnData);
834 co_return std::move(returnData);
838 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Guild_Templates };
839 co_await NewThreadAwaitable<std::vector<GuildTemplateData>>();
840 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
841 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/templates";
842 workload.callStack =
"Guilds::getGuildTemplatesAsync()";
843 GuildTemplateDataVector returnData{};
844 Guilds::httpsClient->submitWorkloadAndGetResult<GuildTemplateDataVector>(workload, returnData);
845 co_return returnData;
849 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Post_Guild_Template };
850 co_await NewThreadAwaitable<GuildTemplateData>();
851 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Post;
852 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/templates";
853 Jsonifier::JsonifierCore parser{};
854 parser.serializeJson(dataPackage, workload.content);
855 workload.callStack =
"Guilds::createGuildTemplateAsync()";
857 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildTemplateData>(workload, returnData);
858 co_return returnData;
862 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Put_Guild_Template };
863 co_await NewThreadAwaitable<GuildTemplateData>();
864 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Put;
865 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/templates/" + dataPackage.
templateCode;
866 workload.callStack =
"Guilds::syncGuildTemplateAsync()";
868 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildTemplateData>(workload, returnData);
869 co_return returnData;
873 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Patch_Guild_Template };
874 co_await NewThreadAwaitable<GuildTemplateData>();
875 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Patch;
876 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/templates/" + dataPackage.templateCode;
877 Jsonifier::JsonifierCore parser{};
878 parser.serializeJson(dataPackage, workload.content);
879 workload.callStack =
"Guilds::modifyGuildTemplateAsync()";
881 Guilds::httpsClient->submitWorkloadAndGetResult<
GuildTemplateData>(workload, returnData);
882 co_return returnData;
886 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Delete_Guild_Template };
887 co_await NewThreadAwaitable<void>();
888 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Delete;
889 workload.relativePath =
"/guilds/" + dataPackage.
guildId +
"/templates/" + dataPackage.
templateCode;
890 workload.callStack =
"Guilds::deleteGuildTemplateAsync()";
891 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
896 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Invite };
897 co_await NewThreadAwaitable<InviteData>();
898 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
899 workload.relativePath =
"/invites/" + dataPackage.
inviteId;
901 workload.relativePath +=
"?with_counts=true";
903 workload.relativePath +=
"&with_expiration=true";
909 workload.relativePath +=
"?with_expiration=true";
917 workload.callStack =
"Guilds::getInviteAsync()";
919 Guilds::httpsClient->submitWorkloadAndGetResult<
InviteData>(workload, returnData);
920 co_return returnData;
924 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Delete_Invite };
925 co_await NewThreadAwaitable<void>();
926 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Delete;
927 workload.relativePath =
"/invites/" + dataPackage.
inviteId;
928 workload.callStack =
"Guilds::deleteInviteAsync()";
929 if (dataPackage.
reason !=
"") {
930 workload.headersToInsert[
"X-Audit-Log-Reason"] = dataPackage.
reason;
932 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
937 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Get_Current_User_Guilds };
938 co_await NewThreadAwaitable<GuildDataVector>();
939 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Get;
940 workload.relativePath =
"/users/@me/guilds";
941 if (dataPackage.
after != 0) {
942 workload.relativePath +=
"?after=" + dataPackage.
after;
943 if (dataPackage.
before != 0) {
944 workload.relativePath +=
"&before=" + dataPackage.
before;
946 if (dataPackage.
limit != 0) {
947 workload.relativePath +=
"&limit=" + std::to_string(dataPackage.
limit);
949 }
else if (dataPackage.
before != 0) {
950 workload.relativePath +=
"?before=" + dataPackage.
before;
951 if (dataPackage.
limit != 0) {
952 workload.relativePath +=
"&limit=" + std::to_string(dataPackage.
limit);
954 }
else if (dataPackage.
limit != 0) {
955 workload.relativePath +=
"?limit=" + std::to_string(dataPackage.
limit);
957 workload.callStack =
"Users::getCurrentUserGuildsAsync()";
958 GuildDataVector returnData{};
959 Guilds::httpsClient->submitWorkloadAndGetResult<GuildDataVector>(workload, returnData);
960 for (
auto& value: returnData) {
961 value.discordCoreClient = Guilds::discordCoreClient;
963 co_return std::move(returnData);
967 DiscordCoreInternal::HttpsWorkloadData workload{ DiscordCoreInternal::HttpsWorkloadType::Delete_Leave_Guild };
968 co_await NewThreadAwaitable<void>();
969 workload.workloadClass = DiscordCoreInternal::HttpsWorkloadClass::Delete;
970 workload.relativePath =
"/users/@me/guilds/" + dataPackage.
guildId;
971 workload.callStack =
"Guilds::leaveGuildAsync()";
972 Guilds::httpsClient->submitWorkloadAndGetResult<
void>(workload);
976 StopWatch stopWatch{ 5s };
977 void Guilds::insertGuild(
const GuildData& guild) {
981 if (Guilds::doWeCacheGuilds()) {
982 GuildData newGuild{ guild };
983 newGuild.discordCoreClient = Guilds::discordCoreClient;
984 Guilds::getCache().emplace(std::forward<GuildData>(newGuild));
986 if (Guilds::getCache().count() % 1 == 0) {
987 std::cout <<
"THE GUILD COUNT: " << Guilds::getCache().count() <<
", TOTAL TIME: " << stopWatch.totalTimePassed().count()
993 void Guilds::insertGuild(GuildData&& guild) {
997 if (Guilds::doWeCacheGuilds()) {
998 guild.discordCoreClient = Guilds::discordCoreClient;
999 Guilds::getCache().emplace(std::forward<GuildData>(guild));
1001 if (Guilds::getCache().count() % 1 == 0) {
1002 std::cout <<
"THE GUILD COUNT: " << Guilds::getCache().count() <<
", TOTAL TIME: " << stopWatch.totalTimePassed().count()
1008 void Guilds::removeGuild(
const Snowflake guildId) {
1009 Guilds::getCache().erase(guildId);
1012 ObjectCache<Snowflake, GuildData>& Guilds::getCache() {
1013 return Guilds::cache;
1016 bool Guilds::doWeCacheGuilds() {
1017 return Guilds::doWeCacheGuildsBool;
1020 DiscordCoreInternal::HttpsClient* Guilds::httpsClient{};
1021 DiscordCoreClient* Guilds::discordCoreClient{};
1022 ObjectCache<Snowflake, GuildData> Guilds::cache{};
1023 bool Guilds::doWeCacheGuildsBool{};
IconHash discoverySplash
Link to the discovery image's splash.
Snowflake id
The identifier "snowflake" of the given entity.
DiscordCoreClient * discordCoreClient
A pointer to the DiscordCoreClient.
IconHash banner
Url to the Guild's banner.
IconHash splash
Url to the Guild's splash.
@ Premium_Progress_Bar_Enabled
Premium progress bar enabled.
The main namespace for this library.
A CoRoutine - representing a potentially asynchronous operation/function.
Data representing a single Guild preview.
Data structure representing a single Guild.
Represents a Guild Template.
A discord Guild. Used to connect to/disconnect from voice.
For geting a Guild's audit logs.
Snowflake guildId
The guiild id for the Guild which you wish to query the log of.
Snowflake before
Entries that preceded a specific audit log entry ID.
Snowflake userId
The User for whom to look for the actions of.
AuditLogEvent actionType
The action type to acquire audit-logs for.
int32_t limit
The maximum number of actions to acquire from the log.
For getting a Guild from the library's cache or a Discord server.
Snowflake guildId
The id of the Guild to acquire.
For acquiring a Guild preview of a chosen Guild.
Snowflake guildId
The id of the Guild's preview to acquire.
Snowflake guildId
The Guild you would like to delete.
For getting a list of Guild bans.
Snowflake before
Consider only users before given user id.
Snowflake guildId
The Guild from which to collect the list of bans.
Snowflake after
Consider only users after given user id null.
uint64_t limit
Number of users to return ( up to maximum 1000 ).
For getting a single Guild Ban.
Snowflake guildId
The Guild from which to collect the Ban from.
Snowflake userId
The User for whom to collect the Ban of.
For banning a current GuildMember.
std::string reason
The reason for the ban.
Snowflake guildMemberId
The id of the member to be banned.
Snowflake guildId
The id of the Guild from which to ban the member.
For removing a previous created Ban.
Snowflake guildId
The Guild from which to erase the Ban.
std::string reason
The reason for removing this Ban.
Snowflake userId
The user Snowflake of the user who's ban to erase.
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.
std::vector< Snowflake > includeRoles
Roles to be included in the prune.
For pruning a number of GuildMembers from the Guild.
std::string reason
Whether 'pruned' is returned, discouraged for large guilds.
Snowflake guildId
Guild within which to perform the prune.
For collecting a list of Guild voice regions.
Snowflake guildId
The Guild for which to collect the voice regions from.
For geting all of the current invites from a Guild.
Snowflake guildId
The id of the Guild you wish to acquire.
For deleting a Guild integration.
Snowflake integrationId
The integration's id which we are going to delete.
std::string reason
Reason for deleting the integration.
Snowflake guildId
The Guild from which to delete the integration from.
For collecting a Guild's widget settings.
Snowflake guildId
The Guild from which to collect the widget from.
For modifying a Guild's widget.
Snowflake guildId
The Guild for which to modify the widget of.
std::string reason
Reason for modifying the widget.
For collecting a Guild's widget.
Snowflake guildId
The Guild from which to collect the widget 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 Guild's widget image.
Snowflake guildId
The Guild for which to collect the widget image from.
WidgetStyleOptions widgetStlye
The style of widget image to collect.
For collecting a Guild's welcome screen.
Snowflake guildId
The Guild for which to collect the widget image from.
For modifying a Guild's welcome screen.
Snowflake guildId
The Guild for which to modify the welcome screen of.
std::string reason
The reason for modifying the welcome screen.
For collecting a Guild's template.
std::string templateCode
Code for the desired Template.
For creating a Guild from a Guild template.
std::string templateCode
Code for the desired Template to use.
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 creating a Guild Template.
Snowflake guildId
Guild within which you wuold like to create the template.
For syncing a Guild Template.
Snowflake guildId
Guild for which you would like to sync the template of.
std::string templateCode
Template code for which template you would like to sync.
For modifying a Guild Template.
Snowflake guildId
Guild within which you would like to modify the Template.
For deleting a Guild Template.
Snowflake guildId
The Guild within which you would like to delete the Template.
std::string templateCode
The template which you would like to delete.
For geting a single invite's responseData from a Guild.
Snowflake inviteId
The id of the invite you wish to acquire.
Snowflake guildScheduledEventId
The Guild scheduled event to include with the invite.
bool withExpiration
Collect expiration time/date?
bool withCount
Collect usage etc counts?
For deleting a single Guild Invite.
Snowflake inviteId
The Invite which you would like to delete.
std::string reason
Reason for deleting the Invite.
For collecting a list of Guild's that the Bot is in.
Snowflake before
Get guilds before this Guild ID.
uint32_t limit
Max number of guilds to return (1 - 200).
Snowflake after
Get guilds after this Guild ID.
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.
std::vector< std::string > features
Array of Guild feature strings enabled Guild features.
AfkTimeOutDurations afkTimeout
Afk timeout in seconds.
bool premiumProgressBarEnabled
Whether or not the progress bar is enabled.
std::string name
Desired name of the Guild.
Snowflake afkChannelId
Snowflake for afk channels.
ExplicitContentFilterLevel explicitContentFilter
Explicit content filter level.
Snowflake rulesChannelId
The id of the Channel where Community guilds display rules and /or guidelines.
Snowflake guildId
Snowflake of the chosen Guild to modify.
VerificationLevel verificationLevel
Verification level.
std::string reason
Reason for modifying the Guild.
Snowflake systemChannelId
Base64 16 : 9 png / jpeg image for the Guild discovery splash(when the server has the DISCOVERABLE fe...
std::string preferredLocale
The preferred locale of a Community Guild used in server discovery.
Snowflake publicUpdatesChannelId
The id of the Channel where admins and moderators of Community guilds receive notices from Discord.
std::string description
The description for the Guild, if the Guild is discoverable.
Snowflake ownerId
User id to transfer Guild ownership to (must be owner).
DefaultMessageNotificationLevel defaultMessageNotifications
Default message notification level.
SystemChannelFlags systemChannelFlags
System Channel flags.
static CoRoutine< GuildTemplateData > createGuildTemplateAsync(CreateGuildTemplateData dataPackage)
Creates a Guild Template.
static CoRoutine< void > deleteGuildAsync(DeleteGuildData dataPackage)
Deletes a chosen Guild.
static CoRoutine< GuildTemplateData > syncGuildTemplateAsync(SyncGuildTemplateData dataPackage)
Syncs a Guild Template.
static CoRoutine< GuildDataVector > getCurrentUserGuildsAsync(GetCurrentUserGuildsData dataPackage)
Collects a list of Guilds that the Bot is in.
static CoRoutine< GuildWidgetData > modifyGuildWidgetAsync(ModifyGuildWidgetData dataPackage)
Modifies the Guild widget for a particular server.
static CoRoutine< GuildTemplateData > modifyGuildTemplateAsync(ModifyGuildTemplateData dataPackage)
Modifies a Guild Template.
static CoRoutine< WelcomeScreenData > modifyGuildWelcomeScreenAsync(ModifyGuildWelcomeScreenData dataPackage)
Modifies the Guild welcome screen.
static CoRoutine< WelcomeScreenData > getGuildWelcomeScreenAsync(GetGuildWelcomeScreenData dataPackage)
Gets the Guild welcome screen for a particular server.
static CoRoutine< void > removeGuildBanAsync(RemoveGuildBanData dataPackage)
Removes a previously created ban.
static CoRoutine< std::vector< GuildData > > getAllGuildsAsync()
Returns all of the Guilds that the current bot is in.
static CoRoutine< GuildPruneCountData > getGuildPruneCountAsync(GetGuildPruneCountData dataPackage)
For collecting the Guild prune count.
static CoRoutine< Guild > createGuildFromGuildTemplateAsync(CreateGuildFromGuildTemplateData dataPackage)
Creates a Guild from the Guild Template.
static CoRoutine< std::vector< InviteData > > getGuildInvitesAsync(GetGuildInvitesData dataPackage)
Gets multiple invites from the Discord servers.
static GuildData getCachedGuild(GetGuildData dataPackage)
Collects a Guild from the library's cache.
static CoRoutine< Guild > modifyGuildAsync(ModifyGuildData dataPackage)
Modifies a chosen Guild's properties.
static CoRoutine< InviteData > getGuildVanityInviteAsync(GetGuildVanityInviteData dataPackage)
Gets the vanity invite responseData from a particular server.
static CoRoutine< void > deleteGuildTemplateAsync(DeleteGuildTemplateData dataPackage)
Deletes a Guild Template.
static CoRoutine< void > leaveGuildAsync(LeaveGuildData dataPackage)
Removes the bot from a chosen Guild.
static CoRoutine< BanData > getGuildBanAsync(GetGuildBanData dataPackage)
Collects a single Ban from a chosen Guild.
static CoRoutine< Guild > getGuildAsync(GetGuildData dataPackage)
Collects a Guild from the Discord servers.
static CoRoutine< GuildWidgetImageData > getGuildWidgetImageAsync(GetGuildWidgetImageData dataPackage)
Gets the Guild widget image for a particular server.
static CoRoutine< std::vector< IntegrationData > > getGuildIntegrationsAsync(GetGuildIntegrationsData dataPackage)
Gets the list of Guild integrations for a particular server.
static CoRoutine< InviteData > getInviteAsync(GetInviteData dataPackage)
Gets an invite from the Discord servers.
static CoRoutine< std::vector< VoiceRegionData > > getGuildVoiceRegionsAsync(GetGuildVoiceRegionsData dataPackage)
Gets the list of voice regions for a particular server.
static CoRoutine< std::vector< GuildTemplateData > > getGuildTemplatesAsync(GetGuildTemplatesData dataPackage)
Collects a list of Guild Templates from a chosen Guild.
static CoRoutine< std::vector< BanData > > getGuildBansAsync(GetGuildBansData dataPackage)
Collects a list of Bans from a chosen Guild.
static CoRoutine< GuildPruneCountData > beginGuildPruneAsync(BeginGuildPruneData dataPackage)
For performing a pruning of the GuildMembers of the Guild, based on days of inactivity.
static CoRoutine< void > deleteInviteAsync(DeleteInviteData dataPackage)
Deletes an invite from the Discord servers.
static CoRoutine< GuildWidgetData > getGuildWidgetSettingsAsync(GetGuildWidgetSettingsData dataPackage)
Gets the Guild widget's settings for a particular server.
static CoRoutine< GuildTemplateData > getGuildTemplateAsync(GetGuildTemplateData dataPackage)
Gets the Guild Template from a particular server.
static CoRoutine< GuildPreviewData > getGuildPreviewAsync(GetGuildPreviewData dataPackage)
Acquires the preview Data of a chosen Guild.
static CoRoutine< GuildWidgetData > getGuildWidgetAsync(GetGuildWidgetData dataPackage)
Gets the Guild widget for a particular server.
static CoRoutine< AuditLogData > getGuildAuditLogsAsync(GetGuildAuditLogsData dataPackage)
Gets an audit log from the Discord servers.
static CoRoutine< Guild > createGuildAsync(CreateGuildData dataPackage)
Creates a new Guild.
static CoRoutine< void > deleteGuildIntegrationAsync(DeleteGuildIntegrationData dataPackage)
Deletes an integration from a Guild.
static CoRoutine< void > createGuildBanAsync(CreateGuildBanData dataPackage)
Bans a GuildMember.