mirror of https://github.com/knrd1/chatgpt.git
addressing bugs
This commit is contained in:
parent
fb2430724c
commit
9ffe6d7ff4
|
@ -62,6 +62,7 @@ while True:
|
|||
except UnicodeDecodeError:
|
||||
continue
|
||||
chunk = data.split()
|
||||
if len(chunk) > 0:
|
||||
if data.startswith(":"):
|
||||
command = chunk[1]
|
||||
else:
|
||||
|
@ -147,8 +148,7 @@ while True:
|
|||
n=1,
|
||||
size="1024x1024"
|
||||
)
|
||||
answers = response.data[0].url
|
||||
long_url = answers
|
||||
long_url = response.data[0].url
|
||||
type_tiny = pyshorteners.Shortener()
|
||||
short_url = type_tiny.tinyurl.short(long_url)
|
||||
irc.send(bytes("PRIVMSG " + channel + " :" + short_url + "\n", "UTF-8"))
|
||||
|
@ -159,4 +159,6 @@ while True:
|
|||
print("Invalid model.")
|
||||
irc.send(bytes("PRIVMSG " + channel + " :Invalid model.\n", "UTF-8"))
|
||||
continue
|
||||
else:
|
||||
continue
|
||||
time.sleep(1)
|
||||
|
|
Loading…
Reference in New Issue