diff options
Diffstat (limited to 'src/commands/nsfw/gelbooru.ts')
| -rw-r--r-- | src/commands/nsfw/gelbooru.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/nsfw/gelbooru.ts b/src/commands/nsfw/gelbooru.ts index 2f6fdeb..6a21c10 100644 --- a/src/commands/nsfw/gelbooru.ts +++ b/src/commands/nsfw/gelbooru.ts @@ -2,7 +2,7 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import { MessageEmbed } from 'discord.js'; import axios from 'axios' -export default class GelbooruBot extends Command { +export default class GelbooruNSFW extends Command { constructor(client) { super(client, { name: 'gelbooru', @@ -34,15 +34,15 @@ export default class GelbooruBot extends Command { let blacklist = ['loli', 'shota', 'cub', 'young', 'child', 'baby', 'guro', 'gore', 'vore', 'scat']; if (tags !== 0) { - if (blacklist.includes(tags)) { - msg.reply('Blacklisted word was used! ⛔') + if (blacklist.includes(tags.toLowerCase())) { + return msg.reply('Blacklisted word was used! ⛔') } } let res = await axios.get(`https://gelbooru.com/index.php?page=dapi&s=post&q=index&limit=100&tags=${tags}+-rating:safe&json=1`) - if (blacklist.includes(res.data[randomInt].tags)) { - msg.reply('Sorry! This image had a tag that was blacklisted! ⛔') + if (blacklist.includes(res.data[randomInt].tags.toLowerCase())) { + return msg.reply('Sorry! This image had a tag that was blacklisted! ⛔') } let getRating = (rating) => { |