Update Bot (j'ai plus le repo sur GitHub)
Qui c'est la conne qui a delete le repo sur GitHub? C'EST MOIIIII
This commit is contained in:
31
commands/utility/avatar.js
Normal file
31
commands/utility/avatar.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
category: 'utility',
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('avatar')
|
||||
.setDescription('Affiche l\'avatar d\'un utilisateur.')
|
||||
.addUserOption(option =>
|
||||
option.setName('user')
|
||||
.setDescription('L\'utilisateur dont tu veux voir l\'avatar')
|
||||
.setRequired(false)),
|
||||
async execute(interaction) {
|
||||
const target = interaction.options.getUser('user') || interaction.user;
|
||||
const { colors, emojis } = require('../../utils/constants');
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: `${target.displayName}`,
|
||||
iconURL: target.displayAvatarURL({ dynamic: true })
|
||||
})
|
||||
.setTitle(`${emojis.avatar} Avatar`)
|
||||
.setColor(colors.utility)
|
||||
.setImage(target.displayAvatarURL({ dynamic: true, size: 4096 }))
|
||||
.setDescription(`[Télécharger l'avatar](${target.displayAvatarURL({ dynamic: true, size: 4096 })})`)
|
||||
.setFooter({ text: `Demandé par ${interaction.user.displayName} • ${interaction.guild.name}`, iconURL: interaction.user.displayAvatarURL() })
|
||||
.setTimestamp();
|
||||
|
||||
await interaction.reply({ embeds: [embed] });
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user