From 8882429338412c3f70e0eeaae284f159a855d2dc Mon Sep 17 00:00:00 2001 From: MARCROCK22 Date: Sat, 5 Apr 2025 13:17:07 -0400 Subject: [PATCH] fix: transformer type --- src/common/shorters/guilds.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/shorters/guilds.ts b/src/common/shorters/guilds.ts index 0194593..ef43bf4 100644 --- a/src/common/shorters/guilds.ts +++ b/src/common/shorters/guilds.ts @@ -72,7 +72,9 @@ export class GuildShorter extends BaseShorter { if (guild) return guild; } - const data = await this.client.proxy.guilds(id).get({ query: (options as GuildFetchOptions).query }); + const data = await this.client.proxy + .guilds(id) + .get({ query: typeof options === 'boolean' ? undefined : options.query }); await this.client.cache.guilds?.patch(CacheFrom.Rest, id, data); return (await this.client.cache.guilds?.raw(id)) ?? data; } @@ -87,7 +89,7 @@ export class GuildShorter extends BaseShorter { return this.client.proxy.guilds(id).widget.get({ query: { style } }); } - async edit(guildId: string, body: RESTPatchAPIGuildJSONBody, reason?: string) { + async edit(guildId: string, body: RESTPatchAPIGuildJSONBody, reason?: string): Promise> { const guild = await this.client.proxy.guilds(guildId).patch({ body, reason }); if (!this.client.cache.hasGuildsIntent) await this.client.cache.guilds?.patch(CacheFrom.Rest, guildId, guild);