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",
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")

View File

@ -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: