From 460154eedab63ed8dd256d6e8ef36f1cad2def70 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 11 Apr 2020 12:06:27 -0400 Subject: [PATCH] Don't allow urban in non-nsfw channels --- commands/search/urban.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/search/urban.js b/commands/search/urban.js index 72986f62..1722062c 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -31,6 +31,9 @@ module.exports = class UrbanCommand extends Command { } async run(msg, { word }) { + if (msg.guild && this.client.botListGuilds.includes(msg.guild.id) && !msg.channel.nsfw) { + return msg.reply(`The \`${this.name}\` command can only be used in NSFW channels.`); + } try { const { body } = await request .get('http://api.urbandictionary.com/v0/define')