mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Remove all data stores! Move to maps
This commit is contained in:
@@ -7,22 +7,22 @@ class UserUpdateAction extends Action {
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
|
||||
if (client.store.user) {
|
||||
if (client.store.user.equals(data)) {
|
||||
if (client.user) {
|
||||
if (client.user.equals(data)) {
|
||||
return {
|
||||
old: client.store.user,
|
||||
updated: client.store.user,
|
||||
old: client.user,
|
||||
updated: client.user,
|
||||
};
|
||||
}
|
||||
|
||||
const oldUser = cloneObject(client.store.user);
|
||||
client.store.user.setup(data);
|
||||
const oldUser = cloneObject(client.user);
|
||||
client.user.setup(data);
|
||||
|
||||
client.emit(Constants.Events.USER_UPDATE, oldUser, client.store.user);
|
||||
client.emit(Constants.Events.USER_UPDATE, oldUser, client.user);
|
||||
|
||||
return {
|
||||
old: oldUser,
|
||||
updated: client.store.user,
|
||||
updated: client.user,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user