@getsolara/solara.js
Version:
A lightweight and modular Discord bot framework built on discord.js v14, with truly optional feature packages.
9 lines • 601 B
JavaScript
module.exports = {
name: "$getMessageFlags", description: "Returns semicolon-separated list of flags for a message. Args: messageID", takesBrackets: true,
execute: async (context, args) => {
if (!args[0]) return "[Error: $getMessageFlags requires messageID]";
const messageId = args[0]; const channel = context.channel; if (!channel) return "[Error: Cannot determine channel context]";
try { const msg = await channel.messages.fetch(messageId); return msg.flags?.toArray().join(';') ?? ""; }
catch { return "[Error: Could not fetch message]"; }
}
};