Отправлять гифку, если у пользователя анимированная ава
This commit is contained in:
JonnyBro 2022-01-27 18:03:04 +05:00
parent 907e76db9d
commit 621133f5bd

View file

@ -20,16 +20,14 @@ class Avatar extends Command {
let user = await this.client.resolveUser(args[0]);
if (!user) user = message.author;
const avatarURL = user.displayAvatarURL({
size: 512,
dynamic: true,
format: "png"
size: 512
});
if (message.content.includes("link")) message.channel.send({ content: `<${avatarURL}>` });
if (args[0] === "link") return message.channel.send({ content: `<${avatarURL}>` });
message.channel.send({
files: [{
name: "avatar.png",
attachment: avatarURL
}]
});