nukes everything

This commit is contained in:
Skillz4Killz
2021-11-09 20:47:14 +00:00
committed by GitHub
parent ccd06bf2ac
commit cdb67ba95a
61 changed files with 156 additions and 751 deletions
+1 -6
View File
@@ -13,21 +13,16 @@ export async function getGuild(
guildId: bigint,
options: { counts?: boolean; addToCache?: boolean } = {
counts: true,
addToCache: true,
}
) {
const result = await bot.rest.runMethod<Guild>(bot.rest, "get", bot.constants.endpoints.GUILDS_BASE(guildId), {
with_counts: options.counts,
});
const guild = await bot.transformers.guild(bot, {
const guild = bot.transformers.guild(bot, {
guild: result,
shardId: bot.utils.calculateShardId(bot.gateway, guildId),
});
if (options.addToCache) {
await bot.cache.guilds.set(guild.id, guild);
}
return guild;
}