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 {