diff --git a/src/modules/misc.js b/src/modules/misc.js index 68f670c..3c55508 100644 --- a/src/modules/misc.js +++ b/src/modules/misc.js @@ -663,7 +663,8 @@ color.callback = async function (msg, line, args, {truerandom}) { }) .png() .toBuffer(); - const fileName = `${color.toHex()}.png`; + const hex = color.toHex(); + const fileName = `${hex}.png`; const fields = [ { @@ -701,9 +702,12 @@ color.callback = async function (msg, line, args, {truerandom}) { }); } - const colornamesName = colornamesRaw.match(new RegExp(`^${color.toHex()},([^,]+?),`, "im"))?.[1]; + const colornamesName = colornamesRaw.match(new RegExp(`^${hex},([^,]+?),`, "im"))?.[1]; if (colornamesName) { - fields.push({name: "\u200b", value: `**[colornames](https://colornames.org/) Name**\n${colornamesName}`}); + fields.push({ + name: "\u200b", + value: `**[colornames](https://colornames.org/color/${hex}) Name**\n${colornamesName}`, + }); } return {