remove nsfw category and command (not reliable enough and almost no uses)

This commit is contained in:
Jonny_Bro (Nikita) 2024-11-30 21:31:00 +05:00
parent df79fa2bda
commit 61aad51888
5 changed files with 0 additions and 103 deletions

View file

@ -28,7 +28,6 @@ JaBa does many thing, here is **8 main categories**:
* **Economy**: `profile`, `work`, `achievements`, `slots`, `tictactoe`, `leaderboard` and **9** more!
* **Fun**: `8ball`, `crab`, `lmgtfy`, `lovecalc`, `memes` and **2** more!
* **General**: `afk`, `avatar`, `boosters`, `minecraft`, `remindme`, `shorturl`, `serverinfo`, `userinfo`, `whois` and **7** more!
* **NSFW**: `nsfw` =)
* **Bot's owner commands**: `eval`, `servers`, `reload` and **2** more!
## *Kinda* Cool Dashboard

View file

@ -1,87 +0,0 @@
const { SlashCommandBuilder, ActionRowBuilder, StringSelectMenuBuilder, AttachmentBuilder, InteractionContextType, ApplicationIntegrationType } = require("discord.js");
const BaseCommand = require("../../base/BaseCommand"),
fetch = require("node-fetch");
class NSFW extends BaseCommand {
/**
*
* @param {import("../base/Client")} client
*/
constructor(client) {
super({
command: new SlashCommandBuilder()
.setName("nsfw")
.setDescription(client.translate("nsfw/nsfw:DESCRIPTION"))
.setDescriptionLocalizations({
uk: client.translate("nsfw/nsfw:DESCRIPTION", null, "uk-UA"),
ru: client.translate("nsfw/nsfw:DESCRIPTION", null, "ru-RU"),
})
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall])
.setContexts([InteractionContextType.BotDM, InteractionContextType.PrivateChannel, InteractionContextType.Guild]),
dirname: __dirname,
ownerOnly: false,
});
}
/**
*
* @param {import("../../base/Client")} client
*/
async onLoad(client) {
client.on("interactionCreate", async interaction => {
if (!interaction.isStringSelectMenu()) return;
if (interaction.customId === "nsfw_select") {
await interaction.deferUpdate();
interaction.data = [];
interaction.data.guild = await client.getGuildData(interaction.guildId);
const tag = interaction?.values[0],
splitted = tag.split("_"),
res = await fetch(`https://nsfw-api.jonnybro.ru/media/${splitted[0].charAt(0).toLowerCase()}/${splitted[1].toLowerCase()}`).then(async r => await r.buffer()),
image = new AttachmentBuilder(res, { name: "image.jpeg" });
const embed = client.embed({
image: "attachment://image.jpeg",
});
await interaction.editReply({
embeds: [embed],
files: [image],
});
}
});
}
/**
*
* @param {import("../../base/Client")} client
* @param {import("discord.js").ChatInputCommandInteraction} interaction
*/
async execute(client, interaction) {
await interaction.deferReply({ ephemeral: true });
if (interaction.guild && !interaction.channel.nsfw) return interaction.error("misc:NSFW_COMMAND", null, { edit: true, ephemeral: true });
const tags = ["Hentai_Vanila", "Hentai_Yaoi", "Hentai_Yuri", "Hentai_BDSM", "Hentai_Trap", "Real_Ass", "Real_Boobs", "Real_Pussy"]
.map(tag =>
JSON.parse(
JSON.stringify({
label: `(${tag.split("_")[0]}) ${tag.split("_")[1]}`,
value: tag,
}),
),
);
const row = new ActionRowBuilder().addComponents(new StringSelectMenuBuilder().setCustomId("nsfw_select").setPlaceholder(interaction.translate("common:NOTHING_SELECTED")).addOptions(tags.slice(0, 25)));
await interaction.editReply({
content: interaction.translate("common:AVAILABLE_OPTIONS"),
ephemeral: true,
components: [row],
});
}
}
module.exports = NSFW;

View file

@ -1,5 +0,0 @@
{
"DESCRIPTION": "Sends NSFW image",
"USAGE": "",
"EXAMPLES": "nsfw"
}

View file

@ -1,5 +0,0 @@
{
"DESCRIPTION": "Получить NSFW изображение",
"USAGE": "",
"EXAMPLES": "nsfw"
}

View file

@ -1,5 +0,0 @@
{
"DESCRIPTION": "Отримати NSFW зображення",
"USAGE": "",
"EXAMPLES": "nsfw"
}