DEV Community

Discussion on: Send automated Discord messages through Webhooks using JavaScript (Part 2 - Embeds)

Collapse
 
pealco821103 profile image
Pedro Costa

Hello @BoiDevis just change color: hexToDecimal("#ff0000") with color : 16711680

Collapse
 
oskarcodes profile image
Oskar Codes • Edited

@plug18343602 yeah you can use a decimal color value like @pealco821103 said, but you can also include the hexToDecimal function if you want to use a HEX color code:

function hexToDecimal(hex) {
  return parseInt(hex.replace("#",""), 16)
}