diff --git a/inline.py b/inline.py index 8423ce2..e4b4a0f 100644 --- a/inline.py +++ b/inline.py @@ -117,10 +117,10 @@ class Config: def jsonasResponse(dct): print("LOG:::",str(dct)) - if "imageUrl" in dct: - return JSONResponse(dct["authorized"], dct["success"], dct["imageUrl"], "") - elif "htmlDescription" in dct: - return JSONResponse(dct["authorized"], dct["success"], "", dct["htmlDescription"]) + if "imageurl" 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") @@ -138,13 +138,13 @@ class InlineBot: self.config.read("config.ini") def __makeCommands(self): - self.commands.append(Command("Pony", "yay, ponies!", "imageurl", "imageUrl")) - self.commands.append(Command("Clop", "NSFW ponies", "imageurl", "imageUrl")) - self.commands.append(Command("Furry", "Furries", "imageurl", "imageUrl")) - self.commands.append(Command("Loli", "Cute lolis", "imageurl", "imageUrl")) - self.commands.append(Command("Yiff", "Yiff", "imageurl", "imageUrl")) - self.commands.append(Command("Lewd", "Say hi to the police", "imageurl", "imageUrl")) - self.commands.append(Command("Rasoio", "Dai facciamogli lo scherzo del rasoio!1!!", "genericurl", "htmlDescription")) + self.commands.append(Command("Pony", "yay, ponies!", "imageurl", "imageurl")) + self.commands.append(Command("Clop", "NSFW ponies", "imageurl", "imageurl")) + self.commands.append(Command("Furry", "Furries", "imageurl", "imageurl")) + self.commands.append(Command("Loli", "Cute lolis", "imageurl", "imageurl")) + self.commands.append(Command("Yiff", "Yiff", "imageurl", "imageurl")) + self.commands.append(Command("Lewd", "Say hi to the police", "imageurl", "imageurl")) + self.commands.append(Command("Rasoio", "Dai facciamogli lo scherzo del rasoio!1!!", "genericurl", "htmldescription")) self.cancerCommand = Command("Cancer", "Search cancer", "imageurl", "imageurl") def callRequest(self, command, senderid, text = ""):