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

@@ -175,7 +175,7 @@ class GuildBanManager extends CachedManager {
reason: options.reason,
});
if (user instanceof GuildMember) return user;
const _user = this.client.users.resolve(id);
const _user = this.client.users.cache.get(id);
if (_user) {
return this.guild.members.resolve(_user) ?? _user;
}