2022-10-26 12:38:28 +02:00
|
|
|
const { EmbedBuilder } = require("discord.js");
|
2021-09-06 12:38:25 +02:00
|
|
|
module.exports = {
|
|
|
|
name: "avatar",
|
|
|
|
description: "Show user's avatar in different formats",
|
|
|
|
usage: "{User}",
|
|
|
|
category: "Information",
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
type: 6,
|
|
|
|
name: "user",
|
|
|
|
description: "The user you want to see",
|
|
|
|
required: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
run: async (client, interaction, args) => {
|
|
|
|
const member =
|
|
|
|
interaction.guild.members.cache.get(args[0]) || interaction.member;
|
2022-10-26 12:38:28 +02:00
|
|
|
const embed = new EmbedBuilder()
|
2022-03-02 15:37:01 +01:00
|
|
|
.setAuthor({
|
2022-03-19 17:45:19 +01:00
|
|
|
name: member.user.tag,
|
2022-03-02 15:37:01 +01:00
|
|
|
iconURL: member.user.displayAvatarURL({ dynamic: true, size: 1024 }),
|
|
|
|
})
|
2021-09-06 12:38:25 +02:00
|
|
|
.setColor(client.color)
|
|
|
|
.setTitle(`${member.user.username}'s Avatar`)
|
|
|
|
.setDescription(
|
|
|
|
`\`Links:\` **[png](${member.user.displayAvatarURL({
|
|
|
|
format: "png",
|
|
|
|
size: 2048,
|
|
|
|
})}) | [jpg](${member.user.displayAvatarURL({
|
|
|
|
format: "jpg",
|
|
|
|
size: 2048,
|
|
|
|
})}) | [webp](${member.user.displayAvatarURL({
|
|
|
|
format: "webp",
|
|
|
|
size: 2048,
|
2021-11-18 18:56:42 +01:00
|
|
|
})}) | [gif](${member.user.displayAvatarURL({
|
|
|
|
format: "gif",
|
|
|
|
size: 2048,
|
2021-09-06 12:38:25 +02:00
|
|
|
})})**`
|
|
|
|
)
|
|
|
|
.setImage(
|
2023-02-01 19:50:35 +01:00
|
|
|
member.user.displayAvatarURL({ size: 2048, dynamic: true, format: "png" })
|
2021-09-06 12:38:25 +02:00
|
|
|
)
|
2022-03-02 15:37:01 +01:00
|
|
|
.setFooter({
|
|
|
|
text: `Made by ${client.author}`,
|
|
|
|
iconURL: client.user.displayAvatarURL(),
|
|
|
|
})
|
2021-09-06 12:38:25 +02:00
|
|
|
.setURL(client.web)
|
|
|
|
.setTimestamp();
|
2021-11-18 18:56:42 +01:00
|
|
|
interaction.followUp({ embeds: [embed] });
|
2021-09-06 12:38:25 +02:00
|
|
|
},
|
|
|
|
};
|