This commit is contained in:
JonnyBro 2022-01-24 18:58:48 +05:00
parent 31205292d7
commit ba052ee605
3 changed files with 7 additions and 6 deletions

View file

@ -17,15 +17,15 @@ class SteamCard extends Command {
}
async run(message, args) {
const text = args.join(" ");
if (!text) return message.error("images/qrcode:MISSING_TEXT");
const nArgs = args.join(" ").split(new RegExp(/ <@!(\d+)>/));
if (!args[0]) return message.error("images/qrcode:MISSING_TEXT");
const user = await this.client.resolveUser(args[0]) || message.author;
const user = await this.client.resolveUser(nArgs[1]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("steamcard", {
text: text,
text: nArgs[0],
url: user.displayAvatarURL({
format: "png",
size: 512

View file

@ -8,6 +8,7 @@ module.exports = {
/**
* Gets message prefix
* @param {object} message The Discord message
* @param {object} data Server data
* @returns The prefix
*/
getPrefix(message, data) {

View file

@ -1,5 +1,5 @@
{
"DESCRIPTION": "Создать изображение \"steamcard\"",
"USAGE": "{{prefix}}steamcard (@пользователь)",
"EXAMPLES": "{{prefix}}steamcard\n{{prefix}}steamcard @Jonny_Bro#4226"
"USAGE": "{{prefix}}steamcard [текст] (@пользователь)",
"EXAMPLES": "{{prefix}}steamcard Коллекционная карточка\n{{prefix}}steamcard Карточка @Jonny_Bro#4226"
}