refactor: PresenceUpdate and demuxProbe (#7248)

This commit is contained in:
Voxelli
2022-01-12 02:32:54 +05:30
committed by GitHub
parent 62c74b8333
commit 1745973024
2 changed files with 4 additions and 4 deletions

View File

@@ -6,10 +6,10 @@ const { Events } = require('../../util/Constants');
class PresenceUpdateAction extends Action {
handle(data) {
let user = this.client.users.cache.get(data.user.id);
if (!user && data.user?.username) user = this.client.users._add(data.user);
if (!user && data.user.username) user = this.client.users._add(data.user);
if (!user) return;
if (data.user?.username) {
if (data.user.username) {
if (!user._equals(data.user)) this.client.actions.UserUpdate.handle(data.user);
}