mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Make sure to delete phone call when an error occurs
This commit is contained in:
@@ -32,6 +32,8 @@ module.exports = class AdminPhoneCommand extends Command {
|
|||||||
await this.client.phone.get(id).start();
|
await this.client.phone.get(id).start();
|
||||||
return null;
|
return null;
|
||||||
} catch {
|
} 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!');
|
return msg.reply('Failed to start the call. Try again later!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ module.exports = class PhoneCommand extends Command {
|
|||||||
await this.client.phone.get(id).start();
|
await this.client.phone.get(id).start();
|
||||||
return null;
|
return null;
|
||||||
} catch {
|
} 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!');
|
return msg.reply('Failed to start the call. Try again later!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "123.1.0",
|
"version": "123.1.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user