Answer the question
In order to leave comments, you need to log in
How to make embeds send an image to the ds js13 discord channel?
my code is
const file = new MessageAttachment('s:/BASE/a/b/c/1.jpg');
message.channel.send({
embeds: [
{
title: "txt",
color: [0, 255, 0],
description: "txt",
image: file
}
]
});
};
It prints embed with given parameters without image
Answer the question
In order to leave comments, you need to log in
The image contains a string (link to the image)
When loading from a folder with a code, you can use:
const file = `/img/1.jpg`; // при условии что код embed сообщения находиться в главной папке бота
const file = `../img/1.jpg`; // при условии что код embed сообщения находиться на одну "назад";
// ну и картинка должна лежать в моем примере в папке img в главной папке.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question