diff --git a/src/managers/GuildManager.js b/src/managers/GuildManager.js index 165694040..76eacd4e7 100644 --- a/src/managers/GuildManager.js +++ b/src/managers/GuildManager.js @@ -246,6 +246,7 @@ class GuildManager extends CachedManager { * Options used to fetch a single guild. * @typedef {BaseFetchOptions} FetchGuildOptions * @property {GuildResolvable} guild The guild to fetch + * @property {boolean} [withCounts=true] Whether the approximate member and presence counts should be returned */ /** @@ -270,7 +271,7 @@ class GuildManager extends CachedManager { if (existing) return existing; } - const data = await this.client.api.guilds(id).get({ query: { with_counts: true } }); + const data = await this.client.api.guilds(id).get({ query: { with_counts: options.withCounts ?? true } }); return this._add(data, options.cache); } diff --git a/typings/index.d.ts b/typings/index.d.ts index fe80b1c27..3dfdb7bd4 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -3578,6 +3578,7 @@ export interface FetchedThreads { export interface FetchGuildOptions extends BaseFetchOptions { guild: GuildResolvable; + withCounts?: boolean; } export interface FetchGuildsOptions {