mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
fix
This commit is contained in:
parent
31205292d7
commit
ba052ee605
3 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
}
|
Loading…
Reference in a new issue