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,