From 9751d5f0ffea947efded420ced2d7fe0c59662bd Mon Sep 17 00:00:00 2001 From: Sai Teja Madha <42540377+saiteja-madha@users.noreply.github.com> Date: Wed, 8 Dec 2021 14:23:14 +0530 Subject: [PATCH] Fix #67 --- src/commands/fun/facts.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/fun/facts.js b/src/commands/fun/facts.js index 8a29644ae..1cee7933c 100644 --- a/src/commands/fun/facts.js +++ b/src/commands/fun/facts.js @@ -17,6 +17,7 @@ module.exports = class FactCommand extends Command { command: { enabled: true, usage: "", + aliases: ["fact"], minArgsCount: 1, }, slashCommand: { @@ -61,10 +62,12 @@ async function getFact(user, choice) { const response = await getJson(`${BASE_URL}/${choice}`); if (!response.success) return MESSAGES.API_ERROR; - const imageUrl = response.data?.fact; + const fact = response.data?.fact; + const imageUrl = response.data?.image; const embed = new MessageEmbed() .setColor(EMBED_COLORS.TRANSPARENT) - .setImage(imageUrl) + .setThumbnail(imageUrl) + .setDescription(fact) .setFooter(`Requested by ${user.tag}`); return { embeds: [embed] };