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