mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
20 lines
521 B
JavaScript
20 lines
521 B
JavaScript
const AbstractHandler = require('./AbstractHandler');
|
|
|
|
class RelationshipRemoveHandler extends AbstractHandler {
|
|
handle(packet) {
|
|
const client = this.packetManager.client;
|
|
const data = packet.d;
|
|
if (data.type === 2) {
|
|
if (client.user.blocked.has(data.id)) {
|
|
client.user.blocked.delete(data.id);
|
|
}
|
|
} else if (data.type === 1) {
|
|
if (client.user.friends.has(data.id)) {
|
|
client.user.friends.delete(data.id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = RelationshipRemoveHandler;
|