2023-01-11 03:33:38 -05:00
|
|
|
import Discord,{SlashCommandBuilder} from 'discord.js';
|
2023-01-27 21:33:55 -05:00
|
|
|
import TClient from 'src/client';
|
2023-01-11 03:33:38 -05:00
|
|
|
export default {
|
|
|
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
|
|
|
const embed = new client.embed().setColor(Math.floor(Math.random()*16777215));
|
|
|
|
embed.addFields({name: 'Hex code', value: `#${embed.data.color.toString(16).toUpperCase()}`});
|
|
|
|
interaction.reply({embeds: [embed]});
|
|
|
|
},
|
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('randomcolor')
|
|
|
|
.setDescription('Generate a random hex code')
|
|
|
|
}
|