I've already found an answer.
Linking to the proper url of the file wasn't an option for me, because some images were generated.
You can attach an image to the message, and use this attachment as thumbnail.
Most basic example:
const embed = {
"title": "A Title" ,
"color": 0xF96221,
"thumbnail": {
"url": "attachment://image.png"
},
"fields": [
{
"name": "Field 1:",
"value": "One",
"inline": false
},
{
"name": "Field 2:",
"value": "Two",
"inline": true,
},
{
"name":"Field 3:",
"value":"Three",
"inline": true
},
],
"footer": {
"text":"Footer text"
}
};
Attach the image to the message with:
message.channel.send({
embed,
files: [{
attachment:'img/image.png',
name:'image.png'
}]
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…