summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSin <[email protected]>2020-08-16 21:13:59 +0200
committerGitHub <[email protected]>2020-08-16 21:13:59 +0200
commit4951209a56b61d1cdf64bfd63dbef86489f1273e (patch)
treeed3b1888e4b2029c88a5414d6e11a7a8596c37ff
parentfix: only check tags if tag exists (diff)
downloaddep-core-4951209a56b61d1cdf64bfd63dbef86489f1273e.tar.xz
dep-core-4951209a56b61d1cdf64bfd63dbef86489f1273e.zip
fix: let instead of const
-rw-r--r--server/src/commands/nsfw/Danbooru.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/commands/nsfw/Danbooru.ts b/server/src/commands/nsfw/Danbooru.ts
index 833371d..6496527 100644
--- a/server/src/commands/nsfw/Danbooru.ts
+++ b/server/src/commands/nsfw/Danbooru.ts
@@ -33,8 +33,9 @@ export default class DanbooruNSFW extends Command {
public async exec(msg: Message, { tag }): Promise<Message> {
//@ts-ignore
if (!msg.channel.nsfw) return msg.reply('This is not an NSFW marked channel!');
-
- if (tag) const tags = await tag.trim().toLowerCase();
+
+ let tags;
+ if (tag) tags = await tag.trim().toLowerCase();
const denylist = ['loli', 'shota', 'cub', 'young', 'child', 'baby', 'guro', 'gore', 'vote', 'scat', 'poop', 'kid', 'kiddie', 'kiddy', 'cp', 'shit', 'turd', 'feces', 'excrement', 'excrete'];
if (tags && denylist.includes(tags)) return msg.reply('A denylisted word was used! ⛔');