From 65ae1446a8d7a13eebfb0556cc9815076d523054 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 19 May 2020 20:46:12 -0400 Subject: [PATCH] Don't say "Sent to Voicemail" when it wasn't --- package.json | 2 +- structures/phone/PhoneCall.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bbc8f6ec..19936ffb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "114.16.5", + "version": "114.16.6", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/structures/phone/PhoneCall.js b/structures/phone/PhoneCall.js index 92df62d4..1aa2fa2e 100644 --- a/structures/phone/PhoneCall.js +++ b/structures/phone/PhoneCall.js @@ -47,9 +47,11 @@ module.exports = class PhoneCall { await this.origin.send('☎️ Call ended due to inactivity.'); await this.recipient.send('☎️ Call ended due to inactivity.'); } else if (nonQuitter === 'declined') { - const recipientMsg = validation === 0 ? 'Sent to voicemail.' : 'Declined the call.'; - await this.recipient.send(`☎️ ${recipientMsg}`); const canVoicemail = this.recipient.topic && !this.recipient.topic.includes(''); + const recipientMsg = validation === 0 + ? canVoicemail ? 'Sent to voicemail.' : 'Missed the call.' + : 'Declined the call.'; + await this.recipient.send(`☎️ ${recipientMsg}`); if (validation === 0 && canVoicemail) { await this.origin.send(`☎️ **${this.recipient.guild.name}** didn't answer... Leave a voicemail?`); const voicemailValidation = await verify(this.origin, null);