Fix issue with one-way phone messages

This commit is contained in:
Dragon Fire
2020-02-28 15:31:21 -05:00
parent d902f57715
commit 98a0e189ca
2 changed files with 3 additions and 1 deletions
+3
View File
@@ -14,6 +14,9 @@ module.exports = class PhoneCommand extends Command {
}
async run(msg) {
if (!msg.channel.topic || !msg.channel.topic.includes('<xiao:phone>')) {
return msg.say('You can only start a call in a channel with `<xiao:phone>` in the topic.');
}
const channels = this.client.channels.cache.filter(channel => channel.type === 'text'
&& channel.topic
&& channel.topic.includes('<xiao:phone>')