fix: use guild transformer

This commit is contained in:
MARCROCK22 2025-03-18 23:06:03 -04:00
parent dd0a3bf65b
commit 1731d2de6b
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,6 @@ import {
type AllChannels, type AllChannels,
BaseChannel, BaseChannel,
type CreateStickerBodyRequest, type CreateStickerBodyRequest,
Guild,
type GuildChannelTypes, type GuildChannelTypes,
channelFrom, channelFrom,
} from '../../structures'; } from '../../structures';
@ -92,7 +91,7 @@ export class GuildShorter extends BaseShorter {
const guild = await this.client.proxy.guilds(guildId).patch({ body, reason }); 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); if (!this.client.cache.hasGuildsIntent) await this.client.cache.guilds?.patch(CacheFrom.Rest, guildId, guild);
return new Guild(this.client, guild); return Transformers.Guild(this.client, guild);
} }
list(query?: RESTGetAPICurrentUserGuildsQuery): Promise<AnonymousGuildStructure[]> { list(query?: RESTGetAPICurrentUserGuildsQuery): Promise<AnonymousGuildStructure[]> {

View File

@ -36,8 +36,8 @@ export interface CreateComponentCollectorResult {
run<T extends CollectorInteraction = CollectorInteraction>( run<T extends CollectorInteraction = CollectorInteraction>(
customId: UserMatches, customId: UserMatches,
callback: ComponentCallback<T>, callback: ComponentCallback<T>,
): any; ): void;
stop(reason?: string): any; stop(reason?: string): void;
} }
export class ComponentHandler extends BaseHandler { export class ComponentHandler extends BaseHandler {