@getsolara/solara.js
Version:
A lightweight and modular Discord bot framework built on discord.js v14, with truly optional feature packages.
11 lines • 450 B
JavaScript
const { resolveColor } = require('discord.js');
module.exports = {
name: "$isValidHex",
description: "Checks if the provided string is a valid hex color code. Returns true or false.",
takesBrackets: true,
execute: async (context, args) => {
if (!args[0]) return "false";
try { resolveColor(args[0]); return (/^
catch (e) { return "false"; }
}
};