diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js deleted file mode 100644 index 09ea4311..00000000 --- a/commands/Fun/joke.js +++ /dev/null @@ -1,39 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Joke extends Command { - constructor(client) { - super(client, { - name: "joke", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: ["jo"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message, args, data) { - const joke = await this.client.icanhazdadjoke(); - if (joke.status !== 200) return message.error("misc:ERR_OCCURRED"); - - const embed = new Discord.MessageEmbed() - .setDescription(joke.joke) - .setFooter({ - text: message.translate("fun/joke:FOOTER", { - id: joke.id - }) - }) - .setColor(data.config.embed.color); - - message.reply({ - embeds: [embed] - }); - } -} - -module.exports = Joke; \ No newline at end of file diff --git a/commands/Fun/lmg.js b/commands/Fun/lmg.js index 1efe96c8..0742216b 100644 --- a/commands/Fun/lmg.js +++ b/commands/Fun/lmg.js @@ -21,7 +21,7 @@ class Lmg extends Command { if (!question) return message.error("fun/lmg:MISSING"); const encodedQuestion = question.replace(/[' '_]/g, "+"); await message.reply({ - content: `` + content: `` }); message.delete().catch(() => {}); } diff --git a/commands/Fun/memes.js b/commands/Fun/memes.js new file mode 100644 index 00000000..5026f94c --- /dev/null +++ b/commands/Fun/memes.js @@ -0,0 +1,78 @@ +const Command = require("../../base/Command"), + Discord = require("discord.js"), + fetch = require("node-fetch"); + +class Memes extends Command { + constructor(client) { + super(client, { + name: "memes", + dirname: __dirname, + enabled: true, + guildOnly: true, + aliases: ["mem"], + memberPermissions: [], + botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"], + nsfw: false, + ownerOnly: false, + cooldown: 2000 + }); + } + + async run(message, args, data) { + const tag = args[0]; + const subs = ["memes", "dankmemes", "me_irl", "wholesomememes"]; + + if (tag === "list") { + const embed = new Discord.MessageEmbed() + .setColor(data.config.embed.color) + .setFooter({ + text: data.config.embed.footer + }) + .setTitle(message.translate("fun/memes:EMBED_TITLE")) + .setDescription(subs.join("\n")) + .setTimestamp(); + + message.reply({ + embeds: [embed] + }); + } else if (!tag) { + const m = await message.sendT("fun/memes:SEARCHING_RANDOM"); + + const res = await fetch("https://meme-api.herokuapp.com/gimme/").then(response => response.json()); + const embed = new Discord.MessageEmbed() + .setColor(data.config.embed.color) + .setFooter({ + text: data.config.embed.footer + }) + .setTitle(`${res.title}\n${message.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${message.translate("common:AUTHOR")}: ${res.author}\n${message.translate("fun/memes:UPS")}: ${res.ups}`) + .setImage(res.url) + .setTimestamp(); + + m.edit({ + content: null, + embeds: [embed] + }); + } else if (subs.includes(tag)) { + const m = await message.sendT("fun/memes:SEARCHING", { + tag + }); + + const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); + const embed = new Discord.MessageEmbed() + .setColor(data.config.embed.color) + .setFooter({ + text: data.config.embed.footer + }) + .setTitle(`${res.title}\n${message.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${message.translate("common:AUTHOR")}: ${res.author}\n${message.translate("fun/memes:UPS")}: ${res.ups}`) + .setImage(res.url) + .setTimestamp(); + + m.edit({ + content: null, + embeds: [embed] + }); + } else return message.error("fun/memes:NOT_FOUND"); + } +} + +module.exports = Memes; \ No newline at end of file diff --git a/commands/NSFW/hentai.js b/commands/NSFW/hentai.js deleted file mode 100644 index 9973b4f5..00000000 --- a/commands/NSFW/hentai.js +++ /dev/null @@ -1,106 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"), - fetch = require("node-fetch"); - -class Hentai extends Command { - constructor(client) { - super(client, { - name: "hentai", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["hen"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"], - nsfw: true, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message, args, data) { - const category = args[0]; - let gif = null; - const embed = new Discord.MessageEmbed() - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }) - .setTimestamp(); - - switch (category) { - case "neko": - gif = await fetch("https://nekos.life/api/v2/img/nsfw_neko_gif").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "cum": - gif = await fetch("https://nekos.life/api/v2/img/cum").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "solo": - gif = await fetch("https://nekos.life/api/v2/img/solo").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "anal": - gif = await fetch("https://nekos.life/api/v2/img/anal").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "yuri": - gif = await fetch("https://nekos.life/api/v2/img/yuri").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "blowjob": - gif = await fetch("https://nekos.life/api/v2/img/bj").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "bj": - gif = await fetch("https://nekos.life/api/v2/img/bj").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "pussy": - gif = await fetch("https://nekos.life/api/v2/img/pussy").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "classic": - gif = await fetch("https://nekos.life/api/v2/img/hentai").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "futa": - gif = await fetch("https://nekos.life/api/v2/img/futanari").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "futanari": - gif = await fetch("https://nekos.life/api/v2/img/futanari").then(response => response.json()); - embed.setImage(gif.url); - break; - - case "help": - embed.setTitle(message.translate("nsfw/hentai:HELP_1")); - embed.setDescription(message.translate("nsfw/hentai:HELP_2")); - break; - - default: - gif = await fetch("https://nekos.life/api/v2/img/Random_hentai_gif").then(response => response.json()); - embed.setImage(gif.url); - embed.setDescription(message.translate("nsfw/hentai:NOCATEGORY", { - prefix: data.guild.prefix - })); - break; - } - message.reply({ - embeds: [embed] - }); - } -} - -module.exports = Hentai; \ No newline at end of file diff --git a/commands/NSFW/nsfw.js b/commands/NSFW/nsfw.js new file mode 100644 index 00000000..3dd2500a --- /dev/null +++ b/commands/NSFW/nsfw.js @@ -0,0 +1,78 @@ +const Command = require("../../base/Command"), + Discord = require("discord.js"), + fetch = require("node-fetch"); + +class NSFW extends Command { + constructor(client) { + super(client, { + name: "nsfw", + dirname: __dirname, + enabled: true, + guildOnly: true, + aliases: ["n"], + memberPermissions: [], + botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"], + nsfw: true, + ownerOnly: false, + cooldown: 2000 + }); + } + + async run(message, args, data) { + const tag = args[0]; + const subs = ["ecchi", "lewdanimegirls", "hentai", "hentaifemdom", "animearmpits", "animefeets", "animebooty", "biganimetiddies", "sideoppai", "ahegao"]; + + if (tag === "list") { + const embed = new Discord.MessageEmbed() + .setColor(data.config.embed.color) + .setFooter({ + text: data.config.embed.footer + }) + .setTitle(message.translate("nsfw/nsfw:EMBED_TITLE")) + .setDescription(subs.join("\n")) + .setTimestamp(); + + message.reply({ + embeds: [embed] + }); + } else if (!tag) { + const m = await message.sendT("nsfw/nsfw:SEARCHING_RANDOM"); + + const res = await fetch("https://meme-api.herokuapp.com/gimme/hentai").then(response => response.json()); + const embed = new Discord.MessageEmbed() + .setColor(data.config.embed.color) + .setFooter({ + text: data.config.embed.footer + }) + .setTitle(`${res.title}\n${message.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${message.translate("common:AUTHOR")}: ${res.author}\n${message.translate("fun/memes:UPS")}: ${res.ups}`) + .setImage(res.url) + .setTimestamp(); + + m.edit({ + content: null, + embeds: [embed] + }); + } else if (subs.includes(tag)) { + const m = await message.sendT("nsfw/nsfw:SEARCHING", { + tag + }); + + const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); + const embed = new Discord.MessageEmbed() + .setColor(data.config.embed.color) + .setFooter({ + text: data.config.embed.footer + }) + .setTitle(`${res.title}\n${message.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${message.translate("common:AUTHOR")}: ${res.author}\n${message.translate("fun/memes:UPS")}: ${res.ups}`) + .setImage(res.url) + .setTimestamp(); + + m.edit({ + content: null, + embeds: [embed] + }); + } else return message.error("nsfw/nsfw:NOT_FOUND"); + } +} + +module.exports = NSFW; \ No newline at end of file diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index 70326d9c..8aa24d85 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -1,3 +1,13 @@ +### JaBa v3.4.5 +* Добавлено + * Команда *memes* - Получить мем с выбранного или случайного сабреддита. + +* Изменено + * Переписана команда *hentai*! Теперь она называется *nsfw (n)* и имеет другие категории. + +* Удалено + * Команда *joke*. + ### JaBa v3.4.4a * Исправления * Фикс *clear all*. diff --git a/languages/ru-RU/fun/joke.json b/languages/ru-RU/fun/joke.json deleted file mode 100644 index a649df00..00000000 --- a/languages/ru-RU/fun/joke.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "DESCRIPTION": "Получить случайную шутку!", - "USAGE": "{{prefix}}joke", - "EXAMPLES": "{{prefix}}joke", - "FOOTER": "JaBa | ID шутки: {{id}} | icanhazdadjoke.com" -} \ No newline at end of file diff --git a/languages/ru-RU/fun/memes.json b/languages/ru-RU/fun/memes.json new file mode 100644 index 00000000..0adee526 --- /dev/null +++ b/languages/ru-RU/fun/memes.json @@ -0,0 +1,11 @@ +{ + "DESCRIPTION": "Получить мем с выбранного или случайного сабреддита", + "USAGE": "{{prefix}}memes (тег)", + "EXAMPLES": "{{prefix}}memes\n{{prefix}}memes me_irl", + "SEARCHING": "Ищу мем по тегу `{{tag}}`...", + "SEARCHING_RANDOM": "Ищу случайный мем...", + "EMBED_TITLE": "Доступные категории", + "NOT_FOUND": "Данной категории не существует!", + "SUBREDDIT": "Сабреддит", + "UPS": "Апвоуты" +} \ No newline at end of file diff --git a/languages/ru-RU/nsfw/hentai.json b/languages/ru-RU/nsfw/hentai.json deleted file mode 100644 index f7b4a0cf..00000000 --- a/languages/ru-RU/nsfw/hentai.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "DESCRIPTION": "Получить NSFW гифку", - "USAGE": "{{prefix}}hentai (категория/help)", - "EXAMPLES": "{{prefix}}hentai\n{{prefix}}hentai help", - "NOCATEGORY": "Если Вы хотите увидеть что-либо из определённой категории, введите её название после команды.\nИспользуйте **`{{prefix}}hentai help`** чтобы увидеть все категории\n", - "HELP_1": "Доступные категории (вы так же можете использовать команду без аргументов)", - "HELP_2": "```neko\ncum\nsolo\nanal\nyuri\nblowjob - bj\npussy\nclassic\nfutanari - futa\n```" -} \ No newline at end of file diff --git a/languages/ru-RU/nsfw/nsfw.json b/languages/ru-RU/nsfw/nsfw.json new file mode 100644 index 00000000..5ecfbb8c --- /dev/null +++ b/languages/ru-RU/nsfw/nsfw.json @@ -0,0 +1,9 @@ +{ + "DESCRIPTION": "Получить NSFW изображение с выбранного или случайного сабреддита", + "USAGE": "{{prefix}}hentai (тег/list)", + "EXAMPLES": "{{prefix}}hentai\n{{prefix}}hentai list", + "SEARCHING": "Ищу изображение по тегу `{{tag}}`", + "SEARCHING_RANDOM": "Ищу случайное изображение", + "EMBED_TITLE": "Доступные категории", + "NOT_FOUND": "Данной категории не существует!" +} \ No newline at end of file diff --git a/languages/uk-UA/fun/joke.json b/languages/uk-UA/fun/joke.json deleted file mode 100644 index cd78577d..00000000 --- a/languages/uk-UA/fun/joke.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "DESCRIPTION": "Отримати випадковий жарт!", - "USAGE": "{{prefix}}joke", - "EXAMPLES": "{{prefix}}joke", - "FOOTER": "JaBa | ID жарту: {{id}} | icanhazdadjoke.com" - } \ No newline at end of file diff --git a/languages/uk-UA/fun/memes.json b/languages/uk-UA/fun/memes.json new file mode 100644 index 00000000..0adee526 --- /dev/null +++ b/languages/uk-UA/fun/memes.json @@ -0,0 +1,11 @@ +{ + "DESCRIPTION": "Получить мем с выбранного или случайного сабреддита", + "USAGE": "{{prefix}}memes (тег)", + "EXAMPLES": "{{prefix}}memes\n{{prefix}}memes me_irl", + "SEARCHING": "Ищу мем по тегу `{{tag}}`...", + "SEARCHING_RANDOM": "Ищу случайный мем...", + "EMBED_TITLE": "Доступные категории", + "NOT_FOUND": "Данной категории не существует!", + "SUBREDDIT": "Сабреддит", + "UPS": "Апвоуты" +} \ No newline at end of file diff --git a/languages/uk-UA/nsfw/hentai.json b/languages/uk-UA/nsfw/hentai.json deleted file mode 100644 index 30cebcf2..00000000 --- a/languages/uk-UA/nsfw/hentai.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "DESCRIPTION": "Отримати NSFW гіфку", - "USAGE": "{{prefix}}hentai (категорія/help)", - "EXAMPLES": "{{prefix}}hentai\n{{prefix}}hentai help", - "NOCATEGORY": "Якщо Ви хочете побачити що-небудь з певної категорії, введіть її назву після команди.\nВикористовуйте **`{{prefix}}hentai help`** щоб побачити всі категорії\n", - "HELP_1": "Доступні категорії (ви можете використовувати команду без аргументів)", - "HELP_2": "neko\ncum\nsolo\nanal\nyuri\nblowjob - bj\npussy\nclassic\nfutanari - futa\n```" -} \ No newline at end of file diff --git a/languages/uk-UA/nsfw/nsfw.json b/languages/uk-UA/nsfw/nsfw.json new file mode 100644 index 00000000..5ecfbb8c --- /dev/null +++ b/languages/uk-UA/nsfw/nsfw.json @@ -0,0 +1,9 @@ +{ + "DESCRIPTION": "Получить NSFW изображение с выбранного или случайного сабреддита", + "USAGE": "{{prefix}}hentai (тег/list)", + "EXAMPLES": "{{prefix}}hentai\n{{prefix}}hentai list", + "SEARCHING": "Ищу изображение по тегу `{{tag}}`", + "SEARCHING_RANDOM": "Ищу случайное изображение", + "EMBED_TITLE": "Доступные категории", + "NOT_FOUND": "Данной категории не существует!" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1a548754..867d7578 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jaba", - "version": "3.4.4a", + "version": "3.4.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jaba", - "version": "3.4.3", + "version": "3.4.5", "license": "ISC", "dependencies": { "@discordjs/opus": "^0.7.0", diff --git a/package.json b/package.json index dfd879e8..54156e16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jaba", - "version": "3.4.4a", + "version": "3.4.5", "description": "A very complete Discord bot (more than 100 commands) that uses the Discord.js", "main": "index.js", "private": true,