From 31205292d751949fbae934f1617f9174fe21c656 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Mon, 24 Jan 2022 18:36:48 +0500 Subject: [PATCH] =?UTF-8?q?v3.3.3=20=D0=9D=D0=BE=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D1=8F=20steamc?= =?UTF-8?q?ard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Images/steamcard.js | 45 +++++++++++++++++++++++++++ dashboard/public/docs/updates.md | 4 +++ languages/ru-RU/images/steamcard.json | 5 +++ package.json | 2 +- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 commands/Images/steamcard.js create mode 100644 languages/ru-RU/images/steamcard.json diff --git a/commands/Images/steamcard.js b/commands/Images/steamcard.js new file mode 100644 index 00000000..ca7c9e4f --- /dev/null +++ b/commands/Images/steamcard.js @@ -0,0 +1,45 @@ +const Command = require("../../base/Command"); + +class SteamCard extends Command { + constructor(client) { + super(client, { + name: "steamcard", + dirname: __dirname, + enabled: true, + guildOnly: false, + aliases: ["sc"], + memberPermissions: [], + botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"], + nsfw: false, + ownerOnly: false, + cooldown: 3000 + }); + } + + async run(message, args) { + const text = args.join(" "); + if (!text) return message.error("images/qrcode:MISSING_TEXT"); + + const user = await this.client.resolveUser(args[0]) || message.author; + const m = await message.sendT("misc:PLEASE_WAIT", null, { + prefixEmoji: "loading" + }); + const buffer = await this.client.AmeAPI.generate("steamcard", { + text: text, + url: user.displayAvatarURL({ + format: "png", + size: 512 + }) + }); + m.delete(); + + message.channel.send({ + files: [{ + name: "steamcard.png", + attachment: buffer + }] + }); + } +} + +module.exports = SteamCard; \ No newline at end of file diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index ba8ed7d6..d1ed6271 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -1,3 +1,7 @@ +### JaBa v3.3.3 +* Добавлено + * Команды *steamcard* в категорию *Images*. + ### JaBa v3.3.2 * Добавлено * Команды *crush*, *magik* и *ps4* в категорию *Images*. diff --git a/languages/ru-RU/images/steamcard.json b/languages/ru-RU/images/steamcard.json new file mode 100644 index 00000000..213f2d00 --- /dev/null +++ b/languages/ru-RU/images/steamcard.json @@ -0,0 +1,5 @@ +{ + "DESCRIPTION": "Создать изображение \"steamcard\"", + "USAGE": "{{prefix}}steamcard (@пользователь)", + "EXAMPLES": "{{prefix}}steamcard\n{{prefix}}steamcard @Jonny_Bro#4226" +} \ No newline at end of file diff --git a/package.json b/package.json index ffe0da50..64bc1d30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jaba", - "version": "3.3.2", + "version": "3.3.3", "description": "A very complete Discord bot (more than 100 commands) that uses the Discord.js", "main": "index.js", "private": true,