Change logs:
+ New Event:
> relationshipAdd: user.id, type
> relationshipRemove: user.id
> client.relationships: RelationshipsManager
> User.relationships
> Update Document .-.
- DEPRECATED
> client.blocked
> client.friends
> clientUser.findFriend
> User.blocked
> User.friend
> some console.log()
This commit is contained in:
March 7th
2022-04-12 12:46:08 +07:00
parent 89d8b08a08
commit f73525f278
14 changed files with 297 additions and 163 deletions

View File

@@ -0,0 +1,15 @@
'use strict';
const { Events } = require('../../../util/Constants');
module.exports = (client, { d: data }) => {
data.user ? client.users._add(data.user) : null;
client.relationships.cache.set(data.id, data.type);
/**
* Emitted whenever a relationship is updated.
* @event Client#relationshipUpdate
* @param {UserID} user The userID that was updated
* @param {Number} type The new relationship type
*/
client.emit(Events.RELATIONSHIP_ADD, data.id, data.type);
};