const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('embed')
.setDescription('Create an embed')
.addStringOption(option =>
option.setName('title')
.setDescription('Title of the embed')
.setRequired(true))
.addStringOption(option =>
option.setName('description')
.setDescription('Description of the embed')
.setRequired(true))
.addStringOption(option =>
option.setName('color')
.setDescription('Color of the embed in HEX format (e.g., #FF0000)')
.setRequired(false)),
async execute(interaction) {
const { options } = interaction;
const title = options.getString('title');
const description = options.getString('description');
const color = options.getString('color');
const embed = {
title: title,
description: description,
color: color ? color.replace('#', '') : 'RANDOM' // If color is not provided, use random color
};
await interaction.reply({ embeds: [embed] });
},
};
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('embed')
.setDescription('Create an embed')
.addStringOption(option =>
option.setName('title')
.setDescription('Title of the embed')
.setRequired(true))
.addStringOption(option =>
option.setName('description')
.setDescription('Description of the embed')
.setRequired(true))
.addStringOption(option =>
option.setName('color')
.setDescription('Color of the embed in HEX format (e.g., #FF0000)')
.setRequired(false)),
async execute(interaction) {
const { options } = interaction;
const title = options.getString('title');
const description = options.getString('description');
const color = options.getString('color');
const embed = {
title: title,
description: description,
color: color ? color.replace('#', '') : 'RANDOM' // If color is not provided, use random color
};
await interaction.reply({ embeds: [embed] });
},
};