mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Make sure to delete phone call when an error occurs
This commit is contained in:
@@ -80,6 +80,8 @@ module.exports = class PhoneCommand extends Command {
|
||||
await this.client.phone.get(id).start();
|
||||
return null;
|
||||
} catch {
|
||||
const id = `${msg.guild ? msg.channel.id : msg.author.id}:${channel.id}`;
|
||||
this.client.phone.delete(id);
|
||||
return msg.reply('Failed to start the call. Try again later!');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user