mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Fix hanging up error
This commit is contained in:
@@ -66,7 +66,6 @@ client.on('message', async msg => {
|
|||||||
if (origin) await origin.send(origin.recipient, msg);
|
if (origin) await origin.send(origin.recipient, msg);
|
||||||
if (recipient) await recipient.send(recipient.origin, msg);
|
if (recipient) await recipient.send(recipient.origin, msg);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
|
||||||
return; // eslint-disable-line no-useless-return
|
return; // eslint-disable-line no-useless-return
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ module.exports = class PhoneCall {
|
|||||||
await this.recipient.send('☎️ Call ended due to inactivity.');
|
await this.recipient.send('☎️ Call ended due to inactivity.');
|
||||||
} else {
|
} else {
|
||||||
const quitter = nonQuitter.id === this.origin.id ? this.recipient : this.origin;
|
const quitter = nonQuitter.id === this.origin.id ? this.recipient : this.origin;
|
||||||
await nonQuitter.send(`☎️ **${channel.guild.name}** hung up.`);
|
await nonQuitter.send(`☎️ **${quitter.guild.name}** hung up.`);
|
||||||
await quitter.send('☎️ Hung up.');
|
await quitter.send('☎️ Hung up.');
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
Reference in New Issue
Block a user