diff --git a/commands/phone/admin-phone.js b/commands/phone/admin-phone.js index 8d6e00bc..4f09a8aa 100644 --- a/commands/phone/admin-phone.js +++ b/commands/phone/admin-phone.js @@ -32,6 +32,8 @@ module.exports = class AdminPhoneCommand 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!'); } } diff --git a/commands/phone/phone.js b/commands/phone/phone.js index 7f5b327a..3c39fa3a 100644 --- a/commands/phone/phone.js +++ b/commands/phone/phone.js @@ -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!'); } } diff --git a/package.json b/package.json index bb9fc4e2..b1c4bf73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "123.1.0", + "version": "123.1.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {