2023-11-20 00:59:41 +01:00
|
|
|
import { SlashCommandBuilder } from 'discord.js';
|
2023-11-18 01:03:06 +01:00
|
|
|
|
2023-11-20 00:59:41 +01:00
|
|
|
export const data = new SlashCommandBuilder()
|
|
|
|
.setName('avatar')
|
|
|
|
.setDescription('Get the avatar URL of the selected user, or your own avatar.')
|
|
|
|
.addUserOption(option => option.setName('user').setDescription('The user\'s avatar to show'));
|
|
|
|
|
|
|
|
export async function execute(interaction) {
|
|
|
|
const user = interaction.options.getUser('user');
|
|
|
|
if (user) return interaction.reply(`${user.username}'s avatar: ${user.displayAvatarURL()}`);
|
|
|
|
return interaction.reply(`Your avatar: ${interaction.user.displayAvatarURL()}`);
|
|
|
|
}
|