From 78f0eb903a009952d0ec97f21fed760912f064b0 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 3 Dec 2020 15:11:46 -0500 Subject: [PATCH] Hang up can be blocked --- commands/phone/hang-up.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/phone/hang-up.js b/commands/phone/hang-up.js index a3dc6655..4f2c7aa6 100644 --- a/commands/phone/hang-up.js +++ b/commands/phone/hang-up.js @@ -20,6 +20,9 @@ module.exports = class HangUpCommand extends Command { if (call.adminCall && !this.client.isOwner(msg.author)) { return msg.reply('☎️ You cannot hang up in an admin call.'); } + if (this.client.isBlockedFromPhone(origin, recipient, msg.author)) { + return msg.reply('☎️ You are blocked from hanging up this phone call.'); + } const nonQuitter = msg.channel.id === call.origin.id ? call.recipient : call.origin; await call.hangup(nonQuitter); return null;