Commit 382104cf authored by Mindiell's avatar Mindiell

Fix when rp2 is HoS

parent 991295a2
......@@ -352,16 +352,16 @@ class Rp():
data=data,
headers={"Authorization": config.token},
)
Log.debug(result.status_code)
if result.status_code>=200 and result.status_code<300:
try:
article = json.loads(result.text)
note = article["score"]
answer = True
except Exception as e:
Log.error("Erreur lors de la récupération de l'article : " + str(e))
except Exception as e:
Log.error("Erreur lors de l'appel à l'API : " + str(e))
Log.debug(result.status_code)
if result.status_code>=200 and result.status_code<300:
try:
article = json.loads(result.text)
note = article["score"]
answer = True
except Exception as e:
Log.error("Erreur lors de la récupération de l'article : " + str(e))
if answer:
# Answer is now based on where, who, note, and a little magic
return self.did_rp(channel, user, note)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment