mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Fix lint
This commit is contained in:
@@ -53,24 +53,24 @@ module.exports = class PhoneCall {
|
|||||||
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);
|
||||||
if (!voicemailValidation) {
|
if (voicemailValidation) {
|
||||||
await this.origin.send('☎️ No voicemail will be left.');
|
|
||||||
} else {
|
|
||||||
await this.origin.send('☎️ Please leave your message (max 280 characters) after the beep. _Beep_.');
|
await this.origin.send('☎️ Please leave your message (max 280 characters) after the beep. _Beep_.');
|
||||||
const voicemail = await this.origin.awaitMessages(res => res.content && res.content.length <= 280, {
|
const voicemail = await this.origin.awaitMessages(res => res.content && res.content.length <= 280, {
|
||||||
time: 30000,
|
time: 30000,
|
||||||
max: 1
|
max: 1
|
||||||
});
|
});
|
||||||
if (!voicemail.size) {
|
if (voicemail.size) {
|
||||||
await this.origin.send('☎️ No voicemail will be left.');
|
|
||||||
} else {
|
|
||||||
const voicemailMsg = voicemail.first();
|
const voicemailMsg = voicemail.first();
|
||||||
await this.sendVoicemail(this.recipient, voicemailMsg);
|
await this.sendVoicemail(this.recipient, voicemailMsg);
|
||||||
await this.origin.send('☎️ Your voicemail has been left.');
|
await this.origin.send('☎️ Your voicemail has been left.');
|
||||||
|
} else {
|
||||||
|
await this.origin.send('☎️ No voicemail will be left.');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
await this.origin.send('☎️ No voicemail will be left.');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let originMsg = validation === 0 ? 'didn\'t answer...' : 'declined the call...';
|
const originMsg = validation === 0 ? 'didn\'t answer...' : 'declined the call...';
|
||||||
await this.origin.send(`☎️ **${this.recipient.guild.name}** ${originMsg}`);
|
await this.origin.send(`☎️ **${this.recipient.guild.name}** ${originMsg}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user