Add an image buffer as an attachment to an embed
discordjs 14.6.0, nodejs 18.15.0
I'm trying to use a buffer to attach an image to an embed, and I have no clue how I'm supposed to do it. I keep getting different errors, and I might just be an idiot, but the docs don't provide any insight into how I should do this either. The buffer, embed and message aren't the problem. I can save the image to a file or edit the embed into the message without adding the image.
Parts of the error that might be relevant:
validator: 's.nullish',
given: 'attachment://SPOILER_Example Name.png'
...
constraint: 's.string.url',
given: 'attachment://SPOILER_Example Name.png',
expected: 'expected to match an URL'
It appears the url is rejected, but I don't really know what url to provide other than the attachment name. Am I doing something obvious wrong?
I'm trying to use a buffer to attach an image to an embed, and I have no clue how I'm supposed to do it. I keep getting different errors, and I might just be an idiot, but the docs don't provide any insight into how I should do this either. The buffer, embed and message aren't the problem. I can save the image to a file or edit the embed into the message without adding the image.
Parts of the error that might be relevant:
validator: 's.nullish',
given: 'attachment://SPOILER_Example Name.png'
...
constraint: 's.string.url',
given: 'attachment://SPOILER_Example Name.png',
expected: 'expected to match an URL'
It appears the url is rejected, but I don't really know what url to provide other than the attachment name. Am I doing something obvious wrong?