Closed conlan closed 4 years ago
Hi there, currently when I use client.uploadFile() with a local file it's inserted directly into the chat:
But when I use client.uploadFile() with a buffer and (required) filename, it uploads like this:
Is it possible to use a buffer and have the former result? Or do I need to save the buffer to a local file first and then do that method?
Thanks in advance!
you need to add .png or .jpg to the filename that you used. discord will only render uploaded images if they have the correct extension in the filename that they were uploaded as.
Ah! Okay thanks :)
Hi there, currently when I use client.uploadFile() with a local file it's inserted directly into the chat:
But when I use client.uploadFile() with a buffer and (required) filename, it uploads like this:
Is it possible to use a buffer and have the former result? Or do I need to save the buffer to a local file first and then do that method?
Thanks in advance!