From 519a43af1d420ea8ec5a091a9066e975f1aa403b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 1 Dec 2020 20:15:20 -0500 Subject: [PATCH] Fix --- commands/phone/phone.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/phone/phone.js b/commands/phone/phone.js index 36851fd0..b389ee2e 100644 --- a/commands/phone/phone.js +++ b/commands/phone/phone.js @@ -48,10 +48,10 @@ module.exports = class PhoneCommand extends Command { && channel.topic.includes('') && !channel.topic.includes('') && !channel.topic.includes(``) - && !channel.topic.includes(``) + && (msg.guild && !channel.topic.includes(``)) && (msg.channel.topic && !msg.channel.topic.includes(``)) && (msg.channel.topic && !msg.channel.topic.includes(``)) - && !msg.guild.channels.cache.has(channel.id) + && (msg.guild && !msg.guild.channels.cache.has(channel.id)) && (channelID ? true : !this.client.inPhoneCall(channel))); if (!channels.size) return msg.reply('No channels currently allow phone calls...'); let channel; @@ -66,7 +66,7 @@ module.exports = class PhoneCommand extends Command { if (channel.topic.includes(``)) { return msg.reply('That channel has blocked this channel from calling them.'); } - if (channel.topic.includes(``)) { + if (msg.guild && channel.topic.includes(``)) { return msg.reply('That channel has blocked this server from calling them.'); } } else {