'How to make Discord bot js post the embed link previews without sending the link?
I want to use embeds to send my bot messages, but links in embeds do not sbow link previews. Is there any way to manually add in the link previews after sending an embed message that contains links?
Solution 1:[1]
You can accomplish something like this by using MessageEmbed#setImage, and setting the URL to your image or gif file.
Here is the code I used to accomplish this:
const GifEmbed = new MessageEmbed()
.setImage('https://link-to-your-image.com/image.gif');
if (interaction.commandName === 'gifembed') {
interaction.channel.send({
embeds: [GifEmbed]
});
}
It will display this:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Liam |

