@getsolara/solara.js
Version:
A lightweight and modular Discord bot framework built on discord.js v14, with truly optional feature packages.
12 lines • 588 B
JavaScript
module.exports = {
name: "$isHoisted",
description: "Checks if the specified role ID is hoisted (displayed separately). Args: roleID",
takesBrackets: true,
execute: async (context, args) => {
const roleId = args[0]?.trim();
if (!context.guild) return "[Error: $isHoisted requires guild context]";
if (!roleId || !/^\d{17,19}$/.test(roleId)) return "[Error: Requires valid role ID]";
try { const role = await context.guild.roles.fetch(roleId); return role?.hoist.toString() ?? "false"; }
catch { return "false"; }
}
};