Rewrite presence a little bit (#1853)

* such presence many good

* Update PresenceStore.js

* Update index.js

* Update ClientPresenceStore.js

* Update Presence.js

* Update ClientPresenceStore.js

* Update ClientUser.js

* Update Presence.js

* add timestamps and party

* Update Presence.js

* Update PresenceStore.js

* Update ClientPresenceStore.js

* Update ClientPresenceStore.js
This commit is contained in:
Gus Caplan
2017-09-02 17:57:02 -05:00
committed by Amish Shah
parent 765b652e6a
commit c4df2502ec
17 changed files with 263 additions and 159 deletions

View File

@@ -0,0 +1,15 @@
const DataStore = require('./DataStore');
const { Presence } = require('../structures/Presence');
class PresenceStore extends DataStore {
create(data) {
if (this.has(data.user.id)) {
this.get(data.user.id).patch(data);
} else {
this.set(data.user.id, new Presence(this.client, data));
}
return this.get(data.user.id);
}
}
module.exports = PresenceStore;