Add utility commands for uptime avatar and roll

This commit is contained in:
2026-01-27 09:03:44 +01:00
parent 4e4fb82ceb
commit aba21131b4
3 changed files with 113 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('avatar')
.setDescription('Display a user\'s avatar in full size.')
.addUserOption((option) =>
option
.setName('user')
.setDescription('The user to fetch the avatar for.')
),
category: 'Utility',
async execute(interaction) {
const targetUser = interaction.options.getUser('user') ?? interaction.user;
const avatarUrl = targetUser.displayAvatarURL({ size: 1024, extension: 'png' });
const embed = new EmbedBuilder()
.setColor(0xa55eea)
.setTitle(`${targetUser.username}'s Avatar`)
.setImage(avatarUrl)
.setTimestamp();
await interaction.reply({ embeds: [embed] });
},
};