refactor: use cache.get() for snowflakes, resolve() otherwise
#10626 djs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user