This commit is contained in:
Daniel Bulant 2021-11-05 20:31:33 +01:00
parent bfbc8716fa
commit c2b2286fd6
28 changed files with 787 additions and 1 deletions

30
commands/nsfw/4k.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class FourK extends commando.Command {
constructor(client) {
super(client, {
name: "4k",
memberName: "4k",
group: "nsfw",
nsfw: true,
description: "KKKK",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "4k"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/anal.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
/*module.exports =*/ class Anal extends commando.Command {
constructor(client) {
super(client, {
name: "anal",
memberName: "anal",
group: "nsfw",
nsfw: true,
description: "Anal image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "anal"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/ass.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Ass extends commando.Command {
constructor(client) {
super(client, {
name: "ass",
memberName: "ass",
group: "nsfw",
nsfw: true,
description: "Ass image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "ass"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

49
commands/nsfw/booru.js Normal file
View file

@ -0,0 +1,49 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
module.exports = class Booru extends commando.Command {
constructor(client) {
super(client, {
name: "booru",
memberName: "booru",
group: "nsfw",
nsfw: true,
description: "Random image from booru site",
args: [
{
type: "string",
key: "booru",
prompt: "Kterou booru stránku z booru.org použít?"
}
]
});
}
async run(msg, { booru }) {
try {
var r = await fetch("http://" + booru + ".booru.org/");
var max = 50;
var s = cheerio.load(r.body);
max = parseInt(s("p:first-child").text().substr(8).replace(/,/g, ""));
if(isNaN(max)) {
return msg.channel.send("Booru stránka nenalezena");
}
var url = "http://" + booru + ".booru.org/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * max);
var res = await fetch(url);
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle(booru);
embed.setImage(src);
return msg.channel.send(embed);
} catch(e) {
return msg.channel.send("Booru stránka s tímto názvem nanelezena");
}
}
};

26
commands/nsfw/danbooru.js Normal file
View file

@ -0,0 +1,26 @@
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
module.exports = class Danbooru extends commando.Command {
constructor(client) {
super(client, {
name: "danbooru",
memberName: "danbooru",
group: "nsfw",
nsfw: true,
description: "Random image from danbooru"
});
}
async run(msg) {
var url = "https://danbooru.donmai.us/posts/" + Math.floor(Math.random() * 3830000) + ".json";
const post = await fetch(url).then(r => r.json());
var embed = await newEmbed(msg);
embed.setTitle("Danbooru");
embed.setDescription(post.tag_string_character);
embed.setImage(post.file_url);
return msg.channel.send(embed);
}
};

27
commands/nsfw/gelbooru.js Normal file
View file

@ -0,0 +1,27 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
module.exports = class Gelbooru extends commando.Command {
constructor(client) {
super(client, {
name: "gelbooru",
memberName: "gelbooru",
group: "nsfw",
nsfw: true,
description: "Random image from gelbooru"
});
}
async run(msg) {
const res = await fetch("https://gelbooru.com/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * 69317));
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle("Gelbooru");
embed.setImage(src);
return msg.channel.send(embed);
}
};

30
commands/nsfw/gonewild.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Gonewild extends commando.Command {
constructor(client) {
super(client, {
name: "gonewild",
memberName: "gonewild",
group: "nsfw",
nsfw: true,
description: "Gonewild image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "gonewild"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/hanal.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
/*module.exports =*/ class Hanal extends commando.Command {
constructor(client) {
super(client, {
name: "hanal",
memberName: "hanal",
group: "nsfw",
nsfw: true,
description: "Hentai anal image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "hanal"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/hass.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Hass extends commando.Command {
constructor(client) {
super(client, {
name: "hass",
memberName: "hass",
group: "nsfw",
nsfw: true,
description: "Ass image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "hass"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/hentai.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Hentai extends commando.Command {
constructor(client) {
super(client, {
name: "hentai",
memberName: "hentai",
group: "nsfw",
nsfw: true,
description: "Hentai image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "hentai"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/hkitsune.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Awooify extends commando.Command {
constructor(client) {
super(client, {
name: "hkitsune",
memberName: "hkitsune",
group: "nsfw",
nsfw: true,
description: "Hentai kitsune image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "hkitsune"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/hthigh.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class HThigh extends commando.Command {
constructor(client) {
super(client, {
name: "hthigh",
memberName: "hthigh",
group: "nsfw",
nsfw: true,
description: "Thigh image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "hthigh"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

27
commands/nsfw/hypnohub.js Normal file
View file

@ -0,0 +1,27 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
/*module.exports =*/ class Hypnohub extends commando.Command {
constructor(client) {
super(client, {
name: "hypnohub",
memberName: "hypnohub",
group: "nsfw",
nsfw: true,
description: "HYPNO NSFW"
});
}
async run(msg) {
const res = await fetch("https://hypnohub.net/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * 69317));
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle("Hypnohub");
embed.setImage(src);
return msg.channel.send(embed);
}
};

View file

@ -0,0 +1,28 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
/* module.exports =*/ class KonachanLewd extends commando.Command {
constructor(client) {
super(client, {
name: "konachan-lewd",
memberName: "konachan-lewd",
alias: ["konachan"],
nsfw: true,
group: "nsfw",
description: "Random konachan image. NSFW."
});
}
async run(msg) {
const res = await fetch("https://konachan.com/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * 2412000));
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle("Konachan");
embed.setImage(src);
return msg.channel.send(embed);
}
};

View file

@ -0,0 +1,26 @@
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
module.exports = class Konachan2 extends commando.Command {
constructor(client) {
super(client, {
name: "konachan-safer",
memberName: "konachan-safer",
aliases: ["konachan-safe", "konachan2"],
group: "nsfw",
nsfw: true,
description: "Random konachan image."
});
}
async run(msg) {
const res = await fetch("https://konachan.net/post.json?limit=1&page=" + Math.floor(Math.random() * 241260));
var img = (await res.json())[0];
var embed = await newEmbed(msg);
embed.setTitle("Konachan");
embed.setDescription(`Od ${img.author}`);
embed.setImage(img.file_url);
return msg.channel.send(embed);
}
};

View file

@ -0,0 +1,54 @@
const newEmbed = require("../../utils/nsfwembed");
const Nekos = require("nekos.life");
const neko = new Nekos().nsfw;
const commando = require("@iceprod/discord.js-commando");
module.exports = class NekosCommand extends commando.Command {
constructor(client) {
super(client, {
name: "nekos-lewd",
group: "nsfw",
nsfw: true,
memberName: "nekos",
description: "Uses the nekos.life API. NSFW only.",
examples: ["nekos-lewd help"],
args: [
{
type: "string",
key: "command",
prompt: "Který příkaz chcete spustit?"
}
]
});
}
async run(msg, cmd) {
var c = cmd.command;
if(c === "help") return await this.help();
else {
if(typeof neko[c] === "function") {
return await this.nonText(c, msg);
} else {
return await msg.channel.send("Neexistující příkaz nebo SFW.");
}
}
}
async nonText(cmd, msg) {
var json = await neko[cmd]();
return await this.send(json.url, msg);
}
help() {
return this.msg.channel.send("Otevřete https://github.com/Nekos-life/nekos-dot-life pro dostupné příkazy. Použijte je jako `!nekos-lewd <cmd>`. Pouze NSFW.");
}
async send(src, msg) {
var embed = await newEmbed(msg);
embed.setTitle("Nekos!");
embed.setImage(src);
return msg.channel.send(embed);
}
};

30
commands/nsfw/paizuri.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Paizuri extends commando.Command {
constructor(client) {
super(client, {
name: "paizuri",
memberName: "paizuri",
group: "nsfw",
nsfw: true,
description: "Paizuri image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "paizuri"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

31
commands/nsfw/pgif.js Normal file
View file

@ -0,0 +1,31 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
/*module.exports =*/ class PGif extends commando.Command {
constructor(client) {
super(client, {
name: "pgif",
memberName: "pgif",
aliases: ["porngif"],
nsfw: true,
group: "nsfw",
description: "Porn GIFs.",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "pgif"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/pussy.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
/*module.exports =*/ class Pussy extends commando.Command {
constructor(client) {
super(client, {
name: "pussy",
memberName: "pussy",
group: "nsfw",
nsfw: true,
description: "Pussy image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "pussy"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

View file

@ -0,0 +1,27 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
/*module.exports =*/ class RealBooru extends commando.Command {
constructor(client) {
super(client, {
name: "realbooru",
memberName: "realbooru",
group: "nsfw",
nsfw: true,
description: "Real booru"
});
}
async run(msg) {
const res = await fetch("https://realbooru.com/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * 692475));
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle("Real booru");
embed.setImage(src);
return msg.channel.send(embed);
}
};

27
commands/nsfw/rule34.js Normal file
View file

@ -0,0 +1,27 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
module.exports = class R34 extends commando.Command {
constructor(client) {
super(client, {
name: "rule34",
memberName: "rule34",
group: "nsfw",
nsfw: true,
description: "Random safebooru image."
});
}
async run(msg) {
const res = await fetch("https://rule34.xxx/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * 3297000));
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle("Rule34");
embed.setImage(src);
return await msg.channel.send(embed);
}
};

30
commands/nsfw/tentacle.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Awooify extends commando.Command {
constructor(client) {
super(client, {
name: "tentacle",
memberName: "tentacle",
group: "nsfw",
nsfw: true,
description: "Tentacle image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "tentacle"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

30
commands/nsfw/thigh.js Normal file
View file

@ -0,0 +1,30 @@
const commando = require("@iceprod/discord.js-commando");
const fetch = require("node-fetch");
module.exports = class Awooify extends commando.Command {
constructor(client) {
super(client, {
name: "thigh",
memberName: "thigh",
group: "nsfw",
nsfw: true,
description: "Thigh image",
args: []
});
}
async run(msg) {
var params = new URLSearchParams({
type: "thigh"
});
var data = await fetch("https://nekobot.xyz/api/image?" + params.toString()).then(r => r.json());
if(!data.success) {
return msg.channel.send("Selhalo načítání obrázku");
}
return msg.channel.send({
files: [
data.message
]
});
}
};

27
commands/nsfw/xbooru.js Normal file
View file

@ -0,0 +1,27 @@
var cheerio = require("cheerio");
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
/*module.exports =*/ class XBooru extends commando.Command {
constructor(client) {
super(client, {
name: "xbooru",
memberName: "xbooru",
group: "nsfw",
nsfw: true,
description: "Dirty sister of rule34"
});
}
async run(msg) {
var res = await fetch("https://xbooru.com/index.php?page=dapi&s=post&q=index&id=" + Math.floor(Math.random() * 709426));
var $ = cheerio.load(await res.text(), { xmlMode: true });
var src = $("post").attr("file_url");
var embed = await newEmbed(msg);
embed.setTitle("Xbooru");
embed.setImage(src);
return await msg.channel.send(embed);
}
};

28
commands/nsfw/yandere.js Normal file
View file

@ -0,0 +1,28 @@
const commando = require("@iceprod/discord.js-commando");
const newEmbed = require("../../utils/nsfwembed");
const fetch = require("node-fetch");
module.exports = class Xkcd extends commando.Command {
constructor(client) {
super(client, {
name: "yandere",
memberName: "yandere",
group: "nsfw",
nsfw: true,
description: "Random image of yandere"
});
}
async run(msg) {
var url = "https://yande.re/post.json?limit=1&page=" + Math.floor(Math.random() * 621767);
var res = await fetch(url);
var post = (await res.json())[0];
var embed = await newEmbed(msg);
embed.setTitle("Yandere");
embed.setDescription("Od " + post.author + "\nObrázky se mohou načítat nějakou dobu.");
embed.setImage(post.file_url);
embed.setThumbnail(post.sample_url);
return msg.channel.send(embed);
}
};

View file

@ -48,7 +48,8 @@ client.on("commandRun", (c, p, msg, args) => {
client.registry
.registerGroups([
["ssps", "Příkazy pro SSPŠ"],
["nastaveni", "Nastavení bota"]
["nastaveni", "Nastavení bota"],
["nsfw", "Horny bonk"]
])
.registerDefaultTypes()
.registerCommandsIn(path.join(__dirname, 'commands'));

View file

@ -1,12 +1,14 @@
{
"dependencies": {
"@iceprod/discord.js-commando": "^0.14.4",
"cheerio": "^1.0.0-rc.10",
"discord.js": "12",
"fs-extra": "^10.0.0",
"js-yaml": "^4.1.0",
"luxon": "^2.0.2",
"mariadb": "^2.5.5",
"minimist": "^1.2.5",
"nekos.life": "^2.0.7",
"node-fetch": "2",
"sequelize": "^6.7.0",
"sqlite": "^4.0.23",

16
utils/nsfwembed.js Normal file
View file

@ -0,0 +1,16 @@
const { MessageEmbed } = require("discord.js");
module.exports = async function newEmbed(msg) {
const guild = msg.client.guilds.resolve("854063584007028737");
if(guild) {
const channel = guild.channels.resolve("906254606659629126");
if(channel) {
channel.send(`<@${msg.author.id}> got horny, used ${msg.command?.name}`);
}
}
return new MessageEmbed({
author: {
name: `${msg.member ? msg.member.displayName : msg.author.nickname} got horny`
}
});
}