summaryrefslogtreecommitdiff
path: root/src/commands/nsfw
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-29 04:36:14 -0700
committer8cy <[email protected]>2020-04-29 04:36:14 -0700
commit68d32ab1fa9c79e848038ca1c451e7d8f368531b (patch)
tree6142669ecc054e8a94bad4723dc6fb5c83f8cee1 /src/commands/nsfw
parentThe Return, v8.2.0 (diff)
downloaddep-core-68d32ab1fa9c79e848038ca1c451e7d8f368531b.tar.xz
dep-core-68d32ab1fa9c79e848038ca1c451e7d8f368531b.zip
Cerasus, v9.0.0
basically just add an insane amount of things - all new animal commands - waifu cmds - change/ move clientid, invite, uwufy, support, howify, say, pfp - add ip, security key, vote, datefacts, githubzen, fmk, fml, offsptring, facts, rate, opinion, onion, quantum coin, rolldie, romannumerals, russianrullete, smashorpass, spoiler, sub - minecraft cmds - SERVER check cmds - lewd cmds - roleplay commands - fun commands and games - utils
Diffstat (limited to 'src/commands/nsfw')
-rw-r--r--src/commands/nsfw/danbooru.ts10
-rw-r--r--src/commands/nsfw/gelbooru.ts10
-rw-r--r--src/commands/nsfw/rule34.ts15
3 files changed, 18 insertions, 17 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) => {
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) => {
diff --git a/src/commands/nsfw/rule34.ts b/src/commands/nsfw/rule34.ts
index eb6fa10..669fcad 100644
--- a/src/commands/nsfw/rule34.ts
+++ b/src/commands/nsfw/rule34.ts
@@ -2,7 +2,7 @@ import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
import axios from 'axios'
-export default class Rule34Bot extends Command {
+export default class Rule34NSFW extends Command {
constructor(client) {
super(client, {
name: 'rule34',
@@ -24,7 +24,8 @@ export default class Rule34Bot extends Command {
{
key: 'tags',
prompt: 'What tag(s) would you like?',
- type: 'string'
+ type: 'string',
+ default: '',
}
],
nsfw: true
@@ -32,18 +33,18 @@ export default class Rule34Bot extends Command {
}
async run(msg: CommandoMessage, { tags }) {
let randomInt = Math.floor(Math.random() * 100)
- let blacklist = ['loli', 'shota', 'cub', 'young', 'child', 'baby', 'guro', 'gore', 'vore', 'scat'];
+ let blacklist = ['loli', 'shota', 'cub', 'young', 'child', 'baby', 'guro', 'gore', 'vore', 'scat', 'poop'];
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(`http://rule34.xxx/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 emb = new MessageEmbed()