forked from HonusBot/HonusBot
rasoiate
This commit is contained in:
parent
0f4d62f3c0
commit
adb75dcc67
@ -116,12 +116,10 @@ class Config:
|
|||||||
return self.userAgent
|
return self.userAgent
|
||||||
|
|
||||||
def jsonasResponse(dct):
|
def jsonasResponse(dct):
|
||||||
if "imageUrl" in dct:
|
if not "imageUrl" in dct or not "htmlDescription" in dct:
|
||||||
return JSONResponse(dct["authorized"], dct["success"], dct["imageUrl"], "")
|
|
||||||
elif "htmlDescription" in dct:
|
|
||||||
return JSONResponse(dct["authorized"], dct["success"], "", dct["htmlDescription"])
|
|
||||||
else:
|
|
||||||
raise Exception("Invalid JSON")
|
raise Exception("Invalid JSON")
|
||||||
|
|
||||||
|
return JSONResponse(dct["authorized"], dct["success"], dct["imageUrl"], dct["htmlDescription"])
|
||||||
|
|
||||||
class InlineBot:
|
class InlineBot:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user