storing images for output

I'm making a bot rn and I'm using the string for message links to post images on like embeds and stuff. But I got a good feeling that that's not very efficient or ideal, what would be a better way to store and output images for a bot? If its of any relevancy I'm using sqlite for a database
2 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Xu Xiaolan
Xu XiaolanOP2y ago
Sorry if I'm on the wrong place for this, thought this question would fit here ik it sounds stupid lol, but i'd post the image in like a channel that i have to save the images, then i take the message link and post that, which just posts the image it works fine but im not sure if i'd say its the proper way of doing these things
const attachment = new Discord.MessageAttachment('./path/to/your/image.png', 'image.png');
.setImage('attachment://image.png');
const attachment = new Discord.MessageAttachment('./path/to/your/image.png', 'image.png');
.setImage('attachment://image.png');
would this work? like, i'd put this inside the createEmbed function i have
Want results from more Discord servers?
Add your server