mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Fix issue with one-way phone messages
This commit is contained in:
@@ -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>')
|
||||
|
||||
Reference in New Issue
Block a user