From 0dbb331e7187b63624c1a9eb5216bb4c604e2e5d Mon Sep 17 00:00:00 2001 From: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Date: Sat, 25 May 2024 16:22:21 -0400 Subject: [PATCH] fix: use emojis cache --- src/common/shorters/emojis.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/shorters/emojis.ts b/src/common/shorters/emojis.ts index 200ebc9..7a744ad 100644 --- a/src/common/shorters/emojis.ts +++ b/src/common/shorters/emojis.ts @@ -39,7 +39,7 @@ export class EmojiShorter extends BaseShorter { const emoji = await this.client.proxy.guilds(guildId).emojis.post({ body: bodyResolved, }); - await this.client.cache.channels?.setIfNI('GuildEmojisAndStickers', emoji.id!, guildId, emoji); + await this.client.cache.emojis?.setIfNI('GuildEmojisAndStickers', emoji.id!, guildId, emoji); return new GuildEmoji(this.client, emoji, guildId); } @@ -68,7 +68,7 @@ export class EmojiShorter extends BaseShorter { */ async delete(guildId: string, emojiId: string, reason?: string) { await this.client.proxy.guilds(guildId).emojis(emojiId).delete({ reason }); - await this.client.cache.channels?.removeIfNI('GuildEmojisAndStickers', emojiId, guildId); + await this.client.cache.emojis?.removeIfNI('GuildEmojisAndStickers', emojiId, guildId); } /** @@ -81,7 +81,7 @@ export class EmojiShorter extends BaseShorter { */ async edit(guildId: string, emojiId: string, body: RESTPatchAPIGuildEmojiJSONBody, reason?: string) { const emoji = await this.client.proxy.guilds(guildId).emojis(emojiId).patch({ body, reason }); - await this.client.cache.channels?.setIfNI('GuildEmojisAndStickers', emoji.id!, guildId, emoji); + await this.client.cache.emojis?.setIfNI('GuildEmojisAndStickers', emoji.id!, guildId, emoji); return new GuildEmoji(this.client, emoji, guildId); } }