From f7701fe06193ed33919220348a1cc31d33eaafec Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 7 Jul 2020 10:47:00 -0400 Subject: [PATCH] Change how hang up is shown --- package.json | 2 +- structures/phone/PhoneCall.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0dfbb856..2a193781 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.10.2", + "version": "119.10.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/structures/phone/PhoneCall.js b/structures/phone/PhoneCall.js index 0ac58adb..723b387c 100644 --- a/structures/phone/PhoneCall.js +++ b/structures/phone/PhoneCall.js @@ -36,8 +36,10 @@ module.exports = class PhoneCall { this.active = true; this.setTimeout(); if (this.ownerOrigin) return this; - await this.origin.send(`☎️ **${this.recipient.guild.name}** picked up! Type \`hang up\` to hang up.`); - await this.recipient.send(`☎️ Accepted call from **${this.origin.guild.name}**. Type \`hang up\` to hang up.`); + const inGuild = msg.guild ? undefined : null; + const cmd = msg.anyUsage('hang-up', inGuild, inGuild); + await this.origin.send(`☎️ **${this.recipient.guild.name}** picked up! Use ${cmd} hang up.`); + await this.recipient.send(`☎️ Accepted call from **${this.origin.guild.name}**. Use ${cmd} to hang up.`); return this; }