From b489d85a7d9b12782ce4ca2a3260166f5eb5a1c1 Mon Sep 17 00:00:00 2001 From: hgw Date: Mon, 2 Oct 2023 02:14:36 +0000 Subject: [PATCH] art: jpeg support --- bot.js | 6 ++++-- lib/banter/banter.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bot.js b/bot.js index 0c1a173..57a5887 100644 --- a/bot.js +++ b/bot.js @@ -10,7 +10,7 @@ var config = { //edit your shit here server: "irc.supernets.org", port: 6697, SSL: true, - channels: ['#dev', '#fascinus'], + channels: ['#dev', '#superbowl'], botName: "fascinus", userName: "fascinus", realName: "Sneed" @@ -122,8 +122,10 @@ async function art(chan, url) { var filetype = "jpg" } else if (ext === ".webp") { var filetype = "webp" + } else if (ext === ".jpeg") { + var filetype = "jpeg" } else { - bot.say(chan, "Image must be PNG or JPG"); + bot.say(chan, "Image must be PNG, JPG, JPEG, WEBP"); return } console.log("Starting Banter") diff --git a/lib/banter/banter.py b/lib/banter/banter.py index 51e0df3..f4a01df 100755 --- a/lib/banter/banter.py +++ b/lib/banter/banter.py @@ -20,6 +20,8 @@ def main(imgPath, delay, ASCIIWIDTH, COLORCHAR, FILLER, fileType): os.remove("image.jpg") if os.path.exists("image.webp"): os.remove("image.webp") + if os.path.exists("image.jpeg"): + os.remove("image.jpeg") if os.path.exists("output.txt"): os.remove("output.txt") if validators.url(imgPath) == True: