mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Fix
This commit is contained in:
@@ -12,8 +12,8 @@ module.exports = class HangUpCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg) {
|
async run(msg) {
|
||||||
const origin = client.phone.find(call => call.origin.id === msg.channel.id);
|
const origin = this.client.phone.find(call => call.origin.id === msg.channel.id);
|
||||||
const recipient = client.phone.find(call => call.recipient.id === msg.channel.id);
|
const recipient = this.client.phone.find(call => call.recipient.id === msg.channel.id);
|
||||||
if (!origin && !recipient) return msg.reply('☎️ This channel is not in a phone call.');
|
if (!origin && !recipient) return msg.reply('☎️ This channel is not in a phone call.');
|
||||||
const call = origin || recipient;
|
const call = origin || recipient;
|
||||||
if (!call.active) return msg.reply('☎️ This call is not currently active.');
|
if (!call.active) return msg.reply('☎️ This call is not currently active.');
|
||||||
|
|||||||
Reference in New Issue
Block a user