"title": ${interaction.user.username}'s Profile
ReferenceError: interaction is not defined
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
const profileEmbed = {
"type": "rich",
"color": 0x00fff0,
"title": `${interaction.user.username}'s Profile`
"avatar": ?
}
module.exports = {
data: new SlashCommandBuilder()
.setName('profile')
.setDescription('Replies with your profile!'),
async execute(interaction) {
await interaction.reply({embeds: [profileEmbed]});
},
};
Is there a way that I can use interactions in "title" and with "avatar" aswell? I get "interaction is not defined" error when I run node deploy-commands.js file