more debugging

This commit is contained in:
Michael (GP) 2022-12-14 10:24:57 -05:00
parent babfed9906
commit f8e26275db

10
bot.js
View File

@ -20,8 +20,14 @@ const download_image = async (url, image_path) => {
return new Promise((resolve, reject) =>
response.data
.pipe(fs.createWriteStream(image_path))
.on("finish", () => resolve(true))
.on("error", (e) => reject(e))
.on("finish", () => {
console.log("---- Image Written Succesfully");
resolve(true);
})
.on("error", (e) => {
console.log("---- Image Written Failure");
reject(e);
})
);
};