mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
refactor(PresenceManager): have Presence extend Base and simplify add (#6056)
* refactor(PresenceManager): have Presence extend Base and simplify add * style(Presence): add empty line after super call Co-authored-by: Noel <buechler.noel@outlook.com> Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -19,8 +19,7 @@ class PresenceManager extends CachedManager {
|
||||
*/
|
||||
|
||||
add(data, cache) {
|
||||
const existing = this.cache.get(data.user.id);
|
||||
return existing ? existing.patch(data) : super.add(data, cache, { id: data.user.id });
|
||||
return super.add(data, cache, { id: data.user.id });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user