solara-testing-beta
Version:
A modern, customizable, and lightweight Discord framework.
24 lines • 728 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const discord_js_1 = require("discord.js");
exports.default = {
name: 'color',
execute: async (ctx) => {
if (!ctx.embed) {
ctx.embed = new discord_js_1.EmbedBuilder();
}
if (ctx.args.length < 1) {
throw new Error('color requires 1 argument: color');
}
const colorInput = ctx.args[0];
try {
const color = (0, discord_js_1.resolveColor)(colorInput);
ctx.embed.setColor(color);
}
catch (e) {
throw new Error(`Invalid color provided: ${colorInput}`);
}
return '';
},
};
//# sourceMappingURL=color.js.map