solara-testing-beta
Version:
A modern, customizable, and lightweight Discord framework.
21 lines • 693 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const discord_js_1 = require("discord.js");
exports.default = {
name: 'setEmbedJSON',
execute: async (ctx) => {
if (ctx.args.length < 1) {
throw new Error('setEmbedJSON requires 1 argument: jsonString');
}
const jsonString = ctx.args.join(';');
try {
const embedData = JSON.parse(jsonString);
ctx.embed = new discord_js_1.EmbedBuilder(embedData);
}
catch (e) {
throw new Error(`Invalid JSON provided to setEmbedJSON: ${e.message}`);
}
return '';
},
};
//# sourceMappingURL=setEmbedJSON.js.map