UNPKG

discord-webhook-node

Version:

Allows for easy webhook sending through discord's webhook API

10 lines (9 loc) 234 B
exports.formatColor = (color) => { if (typeof color === 'string' && color.startsWith("#")){ const rawHex = color.split('#')[1]; return parseInt(rawHex, 16); } else { return Number(color); }; };