I want to perform an action using a slash command, for example /hug @dean and then have it mention this user and send a message in an embed that should be random.
What I tried either doesn't get a response or gives me an error for an invalid string format, probably with the user thing.
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName("Hug")
.setDescription ('Give a friend a hug!'),
async execute(interaction) {
const embed = new EmbedBuilder()
.setTitle("ProtoOwner throws a stick!")
.setColor(0x0099ff)
.addFields([
{ name: "[{User} hugs {user}!]", value: reply[randomNum] }
]);
await interaction.reply({ embeds: [embed] });
}
}