diff options
| author | Sin <[email protected]> | 2020-08-16 21:10:53 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-16 21:10:53 +0200 |
| commit | 6a81685d2b56c0a2650a2956dc5df075fe2618b3 (patch) | |
| tree | 534ddb6c55d302aeec1381333efe53661b908c0d /server/src | |
| parent | fix: only check tags if tag exists (diff) | |
| download | dep-core-6a81685d2b56c0a2650a2956dc5df075fe2618b3.tar.xz dep-core-6a81685d2b56c0a2650a2956dc5df075fe2618b3.zip | |
fix: only check tags if tag exists
Diffstat (limited to 'server/src')
| -rw-r--r-- | server/src/commands/nsfw/Gelbooru.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/commands/nsfw/Gelbooru.ts b/server/src/commands/nsfw/Gelbooru.ts index a858ea1..a71fce7 100644 --- a/server/src/commands/nsfw/Gelbooru.ts +++ b/server/src/commands/nsfw/Gelbooru.ts @@ -34,7 +34,7 @@ export default class GelbooruNSFW 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! ⛔'); @@ -74,4 +74,4 @@ export default class GelbooruNSFW extends Command { .setFooter(`Score: ${response.data[randomInt].score} | Rating: ${getRating(response.data[randomInt].rating)}`, msg.author.avatarURL()); return msg.channel.send(embed); } -}
\ No newline at end of file +} |