Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('e621', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`e621 ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
return message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
})
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))]
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('danbooru', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Danbooru ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
return message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
})
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('r34', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Rule34 ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
return message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('xbooru', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`xbooru ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
return message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
})
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('tbib', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`TBIB ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
})
run(message) {
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('safebooru', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Safebooru ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setImage(image.common.file_url)
.setDescription(`[Image URL](${image.common.file_url})`)
.setColor('#C597B8');
return message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('hh', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Hypnohub ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
message.channel.send({ embed });
message.channel.send(image.common.file_url)
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('gelbooru', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Gelbooru ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setDescription(`[Image URL](${image.common.file_url})`)
.setImage(image.common.file_url)
.setColor('#E89F3E');
return message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
})
run(message) {
var errMessage = errors[Math.round(Math.random() * (errors.length - 1))];
if (!message.channel.nsfw) {
message.react('💢');
return message.channel.send(errMessage);
}
if (message.content.toUpperCase().includes('LOLI') || message.content.toUpperCase().includes('GORE')) return message.channel.send('That kind of stuff is not allowed! Not even in NSFW channels!');
var query = message.content.split(/\s+/g).slice(1).join(" ");
booru.search('yandere', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Yandere ${query}`, 'https://b.catgirlsare.sexy/NrAI.png')
.setImage(image.common.file_url)
.setColor('#E89F3E');
message.channel.send({ embed });
}
}).catch(err => {
if (err.name === 'booruError') {
return message.channel.send(`No results found for **${query}**!`);
} else {
return message.channel.send(`No results found for **${query}**!`);
}
})
}
async run ({ t, author, channel }) {
channel.startTyping()
const embed = new SwitchbladeEmbed(author)
const [ image ] = await booru.search('gelbooru.com', ['rating:explicit'], {limit: 1, random: true}).then(booru.commonfy)
embed.setImage(image.common.file_url)
.setTitle(t('commands:hentai.hereIsYourHentai'))
.setColor(Constants.GELBOORU_COLOR)
channel.send(embed).then(() => channel.stopTyping())
}
}