ItzDerock / discord-html-transcripts

A node.js library for generating nicely formatted HTML transcripts with discord.js
http://npmjs.org/package/discord-html-transcripts
Apache License 2.0
207 stars 82 forks source link

attachment appears above embed post #165

Closed gitagogaming closed 9 months ago

gitagogaming commented 12 months ago

I am having an issue here the attachment is appearing above the embed instead of within it.. trying to figrue out what may be causing this or how to resolve it.

image

          .setColor('#0099ff')
          .setTitle(`Ticket from ${interaction.user.username}`)
          .setDescription(`Ticket type: ${data.Ticket}`)
          .addFields(
            {name: 'Email:', value: emailInput, inline: true},
            {name: '** **', value: "** **", inline: true},
            {name: 'Username:', value: usernameInput, inline: true},
            )
          .addFields({name: 'Reason:', value: reasonInput, inline: true})
          .setFooter({text: `Ticket Closed by: ${i.user.username} @ ${new Date().toLocaleString()}`})

          // Send the file and the embed to the custom channel
          await archiveChannel.send({
            embeds: [embed],
            files: [attachment],
          });
xCraimax commented 11 months ago

If i recall it correctly, you can't put an attachement IN the Embed.

SerenModz21 commented 9 months ago

If i recall it correctly, you can't put an attachement IN the Embed.

You are correct. Only images can be shown inside embeds, with the exception of link embeds, which also allow videos.

SerenModz21 commented 9 months ago

Unfortunately @gitagogaming, there is no way around this limitation. Reason being, that is just how Discord made it.

TGTGamer commented 9 months ago

@gitagogaming if it was a significant issue for you, send two separate messages.

One to include the ticket data and a second one simply for the attachment.

ItzDerock commented 9 months ago

This issue is not related to discord-html-transcripts as we have no way to control where the attachment shows.