color: nvm this just needed nullcheck

This commit is contained in:
Cynthia Foxwell 2025-02-04 21:56:43 -07:00
parent 1d991c93e0
commit 4045f25ae7
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -24,7 +24,7 @@ color.callback = async function (msg, line, args, {truerandom, first}) {
}
if (!color.isValid) {
const search = `^([0-9a-f]{6}),${color.toHexString().substring(1)},`;
const search = `^([0-9a-f]{6}),${query},`;
if (!first) {
const colornamesMatches = colornamesRaw.match(new RegExp(search, "img"));
if (colornamesMatches?.length > 1) {