Фикс nsfw в ЛС

This commit is contained in:
JonnyBro 2022-10-11 15:09:30 +05:00
parent 4b84ea832f
commit 0a5720892a

View file

@ -1,4 +1,4 @@
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, SelectMenuBuilder } = require("discord.js"); const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, SelectMenuBuilder, ChannelType } = require("discord.js");
const BaseCommand = require("../../base/BaseCommand"), const BaseCommand = require("../../base/BaseCommand"),
fetch = require("node-fetch"); fetch = require("node-fetch");
@ -34,7 +34,7 @@ class NSFW extends BaseCommand {
async execute(client, interaction) { async execute(client, interaction) {
await interaction.deferReply({ ephemeral: true }); await interaction.deferReply({ ephemeral: true });
if (!interaction.channel.nsfw) return interaction.replyT("misc:NSFW_COMMAND", null, { ephemeral: true, edit: true }); if (!interaction.channel.nsfw || interaction.channel.type === ChannelType.DM) return interaction.replyT("misc:NSFW_COMMAND", null, { ephemeral: true, edit: true });
const tags = ["hentai", "ecchi", "lewdanimegirls", "hentaifemdom", "animefeets", "animebooty", "biganimetiddies", "sideoppai", "ahegao"].map(tag => const tags = ["hentai", "ecchi", "lewdanimegirls", "hentaifemdom", "animefeets", "animebooty", "biganimetiddies", "sideoppai", "ahegao"].map(tag =>
JSON.parse(JSON.stringify({ JSON.parse(JSON.stringify({