mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04: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) {
|
async run(message, args) {
|
||||||
const text = args.join(" ");
|
const nArgs = args.join(" ").split(new RegExp(/ <@!(\d+)>/));
|
||||||
if (!text) return message.error("images/qrcode:MISSING_TEXT");
|
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, {
|
const m = await message.sendT("misc:PLEASE_WAIT", null, {
|
||||||
prefixEmoji: "loading"
|
prefixEmoji: "loading"
|
||||||
});
|
});
|
||||||
const buffer = await this.client.AmeAPI.generate("steamcard", {
|
const buffer = await this.client.AmeAPI.generate("steamcard", {
|
||||||
text: text,
|
text: nArgs[0],
|
||||||
url: user.displayAvatarURL({
|
url: user.displayAvatarURL({
|
||||||
format: "png",
|
format: "png",
|
||||||
size: 512
|
size: 512
|
||||||
|
|
|
@ -8,6 +8,7 @@ module.exports = {
|
||||||
/**
|
/**
|
||||||
* Gets message prefix
|
* Gets message prefix
|
||||||
* @param {object} message The Discord message
|
* @param {object} message The Discord message
|
||||||
|
* @param {object} data Server data
|
||||||
* @returns The prefix
|
* @returns The prefix
|
||||||
*/
|
*/
|
||||||
getPrefix(message, data) {
|
getPrefix(message, data) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"DESCRIPTION": "Создать изображение \"steamcard\"",
|
"DESCRIPTION": "Создать изображение \"steamcard\"",
|
||||||
"USAGE": "{{prefix}}steamcard (@пользователь)",
|
"USAGE": "{{prefix}}steamcard [текст] (@пользователь)",
|
||||||
"EXAMPLES": "{{prefix}}steamcard\n{{prefix}}steamcard @Jonny_Bro#4226"
|
"EXAMPLES": "{{prefix}}steamcard Коллекционная карточка\n{{prefix}}steamcard Карточка @Jonny_Bro#4226"
|
||||||
}
|
}
|
Loading…
Reference in a new issue