summaryrefslogtreecommitdiff
path: root/src/commands/nsfw/danbooru.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/nsfw/danbooru.ts')
-rw-r--r--src/commands/nsfw/danbooru.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/nsfw/danbooru.ts b/src/commands/nsfw/danbooru.ts
index 87df99e..68bcc17 100644
--- a/src/commands/nsfw/danbooru.ts
+++ b/src/commands/nsfw/danbooru.ts
@@ -2,7 +2,7 @@ import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
import axios from 'axios'
-export default class DanbooruBot extends Command {
+export default class DanbooruNSFW extends Command {
constructor(client) {
super(client, {
name: 'danbooru',
@@ -34,15 +34,15 @@ export default class DanbooruBot 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://danbooru.donmai.us/posts.json?limit=200&tags=${tags}+-rating:safe`)
- 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) => {