refactor: use cache.get() for snowflakes, resolve() otherwise

#10626 djs
This commit is contained in:
Elysia
2025-01-21 02:09:03 +07:00
parent b76e8124c6
commit 62d2630643
15 changed files with 31 additions and 31 deletions

View File

@@ -45,7 +45,7 @@ class WelcomeChannel extends Base {
* @type {?(TextChannel|NewsChannel|StoreChannel|ForumChannel|MediaChannel)}
*/
get channel() {
return this.client.channels.resolve(this.channelId);
return this.client.channels.cache.get(this.channelId) ?? null;
}
/**
@@ -53,7 +53,7 @@ class WelcomeChannel extends Base {
* @type {GuildEmoji|Emoji}
*/
get emoji() {
return this.client.emojis.resolve(this._emoji.id) ?? new Emoji(this.client, this._emoji);
return this.client.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji);
}
}