solara-testing-beta
Version:
A modern, customizable, and lightweight Discord framework.
22 lines • 749 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const discord_js_1 = require("discord.js");
exports.default = {
name: 'author',
execute: async (ctx) => {
if (!ctx.embed) {
ctx.embed = new discord_js_1.EmbedBuilder();
}
if (ctx.args.length < 1) {
throw new Error('author requires at least 1 argument: name');
}
const name = ctx.args[0];
const iconURL = ctx.args[1];
const url = ctx.args[2];
if (!name || name.trim() === '')
throw new Error('Author name cannot be empty.');
ctx.embed.setAuthor({ name: name.substring(0, 256), iconURL, url });
return '';
},
};
//# sourceMappingURL=author.js.map