mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
Don't say "Sent to Voicemail" when it wasn't
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "114.16.5",
|
"version": "114.16.6",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -47,9 +47,11 @@ module.exports = class PhoneCall {
|
|||||||
await this.origin.send('☎️ Call ended due to inactivity.');
|
await this.origin.send('☎️ Call ended due to inactivity.');
|
||||||
await this.recipient.send('☎️ Call ended due to inactivity.');
|
await this.recipient.send('☎️ Call ended due to inactivity.');
|
||||||
} else if (nonQuitter === 'declined') {
|
} 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('<xiao:phone:no-voicemail>');
|
const canVoicemail = this.recipient.topic && !this.recipient.topic.includes('<xiao:phone:no-voicemail>');
|
||||||
|
const recipientMsg = validation === 0
|
||||||
|
? canVoicemail ? 'Sent to voicemail.' : 'Missed the call.'
|
||||||
|
: 'Declined the call.';
|
||||||
|
await this.recipient.send(`☎️ ${recipientMsg}`);
|
||||||
if (validation === 0 && canVoicemail) {
|
if (validation === 0 && canVoicemail) {
|
||||||
await this.origin.send(`☎️ **${this.recipient.guild.name}** didn't answer... Leave a voicemail?`);
|
await this.origin.send(`☎️ **${this.recipient.guild.name}** didn't answer... Leave a voicemail?`);
|
||||||
const voicemailValidation = await verify(this.origin, null);
|
const voicemailValidation = await verify(this.origin, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user