This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blobToBase64(blob) { | |
var blobObj = blob[Object.getOwnPropertySymbols(blob)[1]]; | |
const base64_img = `data:image/png;base64,${blobObj.toString('base64')}`; | |
const sfbuff = new Buffer.from(base64_img.split(",")[1], "base64"); | |
return base64data; | |
} | |
/* | |
How to use in Discord.js v13: |