mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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 (recipient) await recipient.send(recipient.origin, msg);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return; // eslint-disable-line no-useless-return
|
||||
}
|
||||
});
|
||||
|
||||
@@ -47,7 +47,7 @@ module.exports = class PhoneCall {
|
||||
await this.recipient.send('☎️ Call ended due to inactivity.');
|
||||
} else {
|
||||
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.');
|
||||
}
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user