fix: needless getter

This commit is contained in:
Marcos Susaña 2025-01-15 17:24:43 -04:00
parent e2d5813496
commit 316a533696
No known key found for this signature in database

View File

@ -104,8 +104,7 @@ export class GuildShorter extends BaseShorter {
/**
* Provides access to channel-related functionality in a guild.
*/
get channels() {
return {
channels = {
/**
* Retrieves a list of channels in the guild.
* @param guildId The ID of the guild.
@ -156,13 +155,7 @@ export class GuildShorter extends BaseShorter {
*/
create: async (guildId: string, body: RESTPostAPIGuildChannelJSONBody) => {
const res = await this.client.proxy.guilds(guildId).channels.post({ body });
await this.client.cache.channels?.setIfNI(
CacheFrom.Rest,
BaseChannel.__intent__(guildId),
res.id,
guildId,
res,
);
await this.client.cache.channels?.setIfNI(CacheFrom.Rest, BaseChannel.__intent__(guildId), res.id, guildId, res);
return channelFrom(res, this.client);
},
@ -216,13 +209,11 @@ export class GuildShorter extends BaseShorter {
});
},
};
}
/**
* Provides access to auto-moderation rule-related functionality in a guild.
*/
get moderation() {
return {
moderation = {
/**
* Retrieves a list of auto-moderation rules in the guild.
* @param guildId The ID of the guild.
@ -292,13 +283,11 @@ export class GuildShorter extends BaseShorter {
.then(rule => Transformers.AutoModerationRule(this.client, rule));
},
};
}
/**
* Provides access to sticker-related functionality in a guild.
*/
get stickers() {
return {
stickers = {
/**
* Retrieves a list of stickers in the guild.
* @param guildId The ID of the guild.
@ -383,5 +372,4 @@ export class GuildShorter extends BaseShorter {
await this.client.cache.stickers?.removeIfNI('GuildExpressions', stickerId, guildId);
},
};
}
}