Hang up can be blocked

This commit is contained in:
Dragon Fire
2020-12-03 15:11:46 -05:00
parent 15fc86c899
commit 78f0eb903a
+3
View File
@@ -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;