hotfix/0.1.1 (#23)
All checks were successful
continuous-integration/drone/push Build is passing

- Fix gifs not animating

Reviewed-on: https://gitea.vylpes.xyz/External/card-drop/pulls/23
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
Ethan Lane 2023-09-04 13:02:02 +01:00 committed by Vylpes
parent f8af969104
commit 6629ac30aa
8 changed files with 22 additions and 19 deletions

View file

@ -20,14 +20,16 @@ export default class Drop extends Command {
const image = readFileSync(randomCard.Path);
const attachment = new AttachmentBuilder(image, { name: `${randomCard.Id}.png` });
await interaction.deferReply();
const attachment = new AttachmentBuilder(image, { name: randomCard.FileName });
const embed = new EmbedBuilder()
.setTitle(randomCard.Name)
.setDescription(randomCard.Series.Name)
.setFooter({ text: CardRarityToString(randomCard.Rarity) })
.setColor(CardRarityToColour(randomCard.Rarity))
.setImage(`attachment://${randomCard.Id}.png`);
.setImage(`attachment://${randomCard.FileName}`);
const row = new ActionRowBuilder<ButtonBuilder>();
@ -43,7 +45,7 @@ export default class Drop extends Command {
.setLabel("Reroll")
.setStyle(ButtonStyle.Secondary));
await interaction.reply({
await interaction.editReply({
embeds: [ embed ],
files: [ attachment ],
components: [ row ],