mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Remove unnecessary deline method from PhoneCall
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class PhoneCall {
|
|||||||
await this.recipient.send(`☎️ Incoming call from **${this.origin.guild.name}**. Pick up?`);
|
await this.recipient.send(`☎️ Incoming call from **${this.origin.guild.name}**. Pick up?`);
|
||||||
const validation = await verify(this.recipient, null);
|
const validation = await verify(this.recipient, null);
|
||||||
if (!validation) {
|
if (!validation) {
|
||||||
await this.decline(validation);
|
await this.hangup('declined', validation);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
await this.accept();
|
await this.accept();
|
||||||
@@ -31,12 +31,6 @@ module.exports = class PhoneCall {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
async decline(validation) {
|
|
||||||
this.client.phone.delete(this.id);
|
|
||||||
await this.hangup('declined', validation);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
async hangup(nonQuitter, validation) {
|
async hangup(nonQuitter, validation) {
|
||||||
this.active = false;
|
this.active = false;
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
|
|||||||
Reference in New Issue
Block a user