Sure.
But your problem is a discord problem.
Not a TwitchAPI problem.
You need to lookup what the Discord library you are using supports for uploading files.
That’ll tell you if you need to use fs or not (it’ll probably support fs or a buffer but that’s discord library problem). personally I’d probably write it to a file with FS. Then call that file and upload via whatever discord library I’m using.
Edit: A quick check suggests that Discord.JS would do something like
message.channel.send("Testing message.", { files: ["./images/headpat1.png"] });
So you’d need to have written the file to disc first (not tested)