art: jpeg support

This commit is contained in:
hgw 2023-10-02 02:14:36 +00:00
parent 1495357801
commit b489d85a7d
2 changed files with 6 additions and 2 deletions

6
bot.js
View File

@ -10,7 +10,7 @@ var config = { //edit your shit here
server: "irc.supernets.org", server: "irc.supernets.org",
port: 6697, port: 6697,
SSL: true, SSL: true,
channels: ['#dev', '#fascinus'], channels: ['#dev', '#superbowl'],
botName: "fascinus", botName: "fascinus",
userName: "fascinus", userName: "fascinus",
realName: "Sneed" realName: "Sneed"
@ -122,8 +122,10 @@ async function art(chan, url) {
var filetype = "jpg" var filetype = "jpg"
} else if (ext === ".webp") { } else if (ext === ".webp") {
var filetype = "webp" var filetype = "webp"
} else if (ext === ".jpeg") {
var filetype = "jpeg"
} else { } else {
bot.say(chan, "Image must be PNG or JPG"); bot.say(chan, "Image must be PNG, JPG, JPEG, WEBP");
return return
} }
console.log("Starting Banter") console.log("Starting Banter")

View File

@ -20,6 +20,8 @@ def main(imgPath, delay, ASCIIWIDTH, COLORCHAR, FILLER, fileType):
os.remove("image.jpg") os.remove("image.jpg")
if os.path.exists("image.webp"): if os.path.exists("image.webp"):
os.remove("image.webp") os.remove("image.webp")
if os.path.exists("image.jpeg"):
os.remove("image.jpeg")
if os.path.exists("output.txt"): if os.path.exists("output.txt"):
os.remove("output.txt") os.remove("output.txt")
if validators.url(imgPath) == True: if validators.url(imgPath) == True: