diff --git a/Xiao.js b/Xiao.js index 584662fe..cca684e2 100644 --- a/Xiao.js +++ b/Xiao.js @@ -66,7 +66,6 @@ client.on('message', async msg => { if (origin) await origin.send(origin.recipient, msg); if (recipient) await recipient.send(recipient.origin, msg); } catch (err) { - console.log(err); return; // eslint-disable-line no-useless-return } }); diff --git a/commands/other/phone.js b/commands/other/phone.js index 9777cf97..6f6170a7 100644 --- a/commands/other/phone.js +++ b/commands/other/phone.js @@ -14,6 +14,9 @@ module.exports = class PhoneCommand extends Command { } async run(msg) { + if (!msg.channel.topic || !msg.channel.topic.includes('')) { + return msg.say('You can only start a call in a channel with `` in the topic.'); + } const channels = this.client.channels.cache.filter(channel => channel.type === 'text' && channel.topic && channel.topic.includes('')