1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 16:30:59 -04:00
Daggerbot-TS/src/commands/randomcolor.ts

12 lines
535 B
TypeScript
Raw Normal View History

2023-01-11 03:33:38 -05:00
import Discord,{SlashCommandBuilder} from 'discord.js';
2023-04-14 06:47:58 -04:00
import TClient from '../client.js';
2023-01-11 03:33:38 -05:00
export default {
2023-03-05 05:04:10 -05:00
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')
2023-01-11 03:33:38 -05:00
}