random-hex-colors
1.0.2 • Public • Published
Installation
> npm i random-hex-colors
Example
const Colors = require("random-hex-colors");
const hexColor = Colors.getRandomColor();
console.log(hexColor);
discord.js v12 Embed Example
const Colors = require("random-hex-colors");
const hexColor = Colors.getRandomColor();
client.on("message", message => {
if (message.content == "embed") {
let embed = new Discord.MessageEmbed()
.setDescription(`Random Color`)
.setColor(hexColor)
message.channel.send(embed)
}
})
discord.js v13 Embed Example
const Colors = require("random-hex-colors");
const hexColor = Colors.getRandomColor();
client.on("messageCreate", message => {
if (message.content == "embed") {
let embed = new Discord.MessageEmbed()
.setDescription(`Random Color`)
.setColor(hexColor)
message.channel.send({embeds: [embed]})
}
})
Package Sidebar
Install
Weekly Downloads