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('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}**!`);
}
})
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('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('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('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('konac', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Konachan ${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('paheal', [query], { limit: 1, random: true })
.then(booru.commonfy)
.then(images => {
for (let image of images) {
const embed = new Discord.MessageEmbed()
.setAuthor(`Paheal ${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('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}**!`);
}
async run ({ t, author, channel }) {
channel.startTyping()
const embed = new SwitchbladeEmbed(author)
const [ image ] = await booru.search('e621.net', ['rating:e'], { limit: 1, random: true }).then(booru.commonfy)
embed.setImage(image.common.file_url)
.setDescription(t('commands:e621.hereIsYour_yiff'))
.setColor(Constants.E621_COLOR)
channel.send(embed).then(() => channel.stopTyping())
}
}