2022-04-12 12:46:08 +07:00
|
|
|
'use strict';
|
|
|
|
|
|
2022-06-12 19:13:12 +07:00
|
|
|
const { Events, RelationshipTypes } = require('../../../util/Constants');
|
2022-04-12 12:46:08 +07:00
|
|
|
|
|
|
|
|
module.exports = (client, { d: data }) => {
|
2022-04-16 17:44:43 +07:00
|
|
|
client.relationships.cache.delete(data.id);
|
2022-09-16 19:08:15 +07:00
|
|
|
client.user.friendNicknames.delete(data.id);
|
2022-04-16 17:44:43 +07:00
|
|
|
/**
|
2022-06-12 19:13:12 +07:00
|
|
|
* Emitted whenever a relationship is delete.
|
2022-05-06 21:17:20 +07:00
|
|
|
* @event Client#relationshipRemove
|
2022-06-11 20:17:27 +07:00
|
|
|
* @param {Snowflake} user The userID that was updated
|
2022-06-12 19:13:12 +07:00
|
|
|
* @param {RelationshipTypes} type The type of the old relationship
|
2022-04-16 17:44:43 +07:00
|
|
|
*/
|
2022-06-12 19:13:12 +07:00
|
|
|
client.emit(Events.RELATIONSHIP_REMOVE, data.id, RelationshipTypes[data.type]);
|
2022-04-12 12:46:08 +07:00
|
|
|
};
|