Can't call own channel

This commit is contained in:
Dragon Fire
2021-03-08 18:30:56 -05:00
parent 232aa19990
commit 15795e7927
+1
View File
@@ -61,6 +61,7 @@ module.exports = class PhoneCommand extends Command {
if (!channel.topic || !channel.topic.includes('<xiao:phone>')) {
return msg.reply('That channel does not allow phone calls.');
}
if (msg.channel.id === channel.id) return msg.reply('You are literally in that channel right now.');
if (this.client.phone.inCall(channel)) return msg.reply('That channel is already in a call.');
if (this.client.phone.isBlocked(msg.channel, channel, msg.author)) {
return msg.reply('That channel has blocked this channel from calling them.');