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

npm i random-hex-colors

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

1.87 kB

Total Files

4

Last publish

Collaborators

  • mohamed98yt