UNPKG

v11-discord.js

Version:

A powerful library for interacting with the Discord API - patched by molo#7947

20 lines (17 loc) 521 B
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;