mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
added .oldStatus to presence update
This commit is contained in:
@@ -1083,13 +1083,14 @@ var Client = (function () {
|
||||
var presenceUser = new User(data.user);
|
||||
if (presenceUser.equalsStrict(userInCache)) {
|
||||
//they're exactly the same, an actual presence update
|
||||
userInCache.status = data.status;
|
||||
self.trigger("presence", {
|
||||
user: userInCache,
|
||||
oldStatus: userInCache.status,
|
||||
status: data.status,
|
||||
server: self.getServer("id", data.guild_id),
|
||||
gameId: data.game_id
|
||||
});
|
||||
userInCache.status = data.status;
|
||||
} else {
|
||||
//one of their details changed.
|
||||
self.userCache[self.userCache.indexOf(userInCache)] = presenceUser;
|
||||
|
||||
@@ -992,13 +992,14 @@ class Client {
|
||||
var presenceUser = new User(data.user);
|
||||
if (presenceUser.equalsStrict(userInCache)) {
|
||||
//they're exactly the same, an actual presence update
|
||||
userInCache.status = data.status;
|
||||
self.trigger("presence", {
|
||||
user: userInCache,
|
||||
oldStatus : userInCache.status,
|
||||
status: data.status,
|
||||
server: self.getServer("id", data.guild_id),
|
||||
gameId: data.game_id
|
||||
});
|
||||
userInCache.status = data.status;
|
||||
} else {
|
||||
//one of their details changed.
|
||||
self.userCache[self.userCache.indexOf(userInCache)] = presenceUser;
|
||||
|
||||
Reference in New Issue
Block a user