diff options
| author | Sin <[email protected]> | 2020-08-16 21:10:35 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-16 21:10:35 +0200 |
| commit | 4cc962efbd98f7bf6390c05308db38c32d2a63ac (patch) | |
| tree | 3d813740ebc2ed67a18db7c7693ad015966c9837 /server/src | |
| parent | fix: remove getRating fn from footer (diff) | |
| download | dep-core-4cc962efbd98f7bf6390c05308db38c32d2a63ac.tar.xz dep-core-4cc962efbd98f7bf6390c05308db38c32d2a63ac.zip | |
fix: only check tags if tag exists
Diffstat (limited to 'server/src')
| -rw-r--r-- | server/src/commands/nsfw/Rule34.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/commands/nsfw/Rule34.ts b/server/src/commands/nsfw/Rule34.ts index dbdabc0..4aa90fd 100644 --- a/server/src/commands/nsfw/Rule34.ts +++ b/server/src/commands/nsfw/Rule34.ts @@ -34,7 +34,7 @@ export default class Rule34NSFW extends Command { //@ts-ignore if (!msg.channel.nsfw) return msg.reply('This is not an NSFW marked channel!'); - const tags = await tag.trim().toLowerCase(); + if (tag) const 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! ⛔'); |