From a5342ba7c9b374f86124f92f9b434b781ad8d82d Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Thu, 11 Aug 2022 20:27:43 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9A=D1=80=D0=B0=D0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Fun/crab.js | 43 +++++++++++++++++++++++++++++++++++ languages/ru-RU/fun/crab.json | 5 ++++ 2 files changed, 48 insertions(+) create mode 100644 commands/Fun/crab.js create mode 100644 languages/ru-RU/fun/crab.json diff --git a/commands/Fun/crab.js b/commands/Fun/crab.js new file mode 100644 index 00000000..de0b2533 --- /dev/null +++ b/commands/Fun/crab.js @@ -0,0 +1,43 @@ +const { SlashCommandBuilder } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"), + fetch = require("node-fetch"); + +class Crab extends BaseCommand { + /** + * + * @param {import("../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("crab") + .setDescription(client.translate("fun/crab:DESCRIPTION")), + aliases: [], + dirname: __dirname, + guildOnly: true, + ownerOnly: false + }); + } + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").ChatInputCommandInteraction} interaction + * @param {Object} data + */ + async execute(client, interaction) { + const res = await fetch("https://and-here-is-my-code.glitch.me/img/crab").then(response => response.json()); + + interaction.reply({ + content: res.Link + }); + } +} + +module.exports = Crab; \ No newline at end of file diff --git a/languages/ru-RU/fun/crab.json b/languages/ru-RU/fun/crab.json new file mode 100644 index 00000000..1b158be5 --- /dev/null +++ b/languages/ru-RU/fun/crab.json @@ -0,0 +1,5 @@ +{ + "DESCRIPTION": "Получить изображение краба... да, это всё, что вы ещё хотели от команды под названием crab?", + "USAGE": "crab", + "EXAMPLES": "crab" +} \ No newline at end of file