fix(embed): fixed color error and inability to add to messages embed

This commit is contained in:
Slincnik 2025-01-11 13:54:21 +03:00
parent b0d882f39a
commit e1e8963306
No known key found for this signature in database

View file

@ -7,9 +7,8 @@ import useClient from "../utils/use-client.js";
*/
export const createEmbed = data => {
const client = useClient();
new EmbedBuilder({
return new EmbedBuilder({
footer: typeof data.footer === "object" ? data.footer : data.footer ? { text: data.footer } : client.configService.get("embed.footer"),
color: data.color ?? client.configService.get("embed.color"),
...data,
});
}).setColor(data.color ?? client.configService.get("embed.color"));
};