mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-16 04:50:39 +01:00
Premier correction Hexas Indispo
This commit is contained in:
@@ -36,6 +36,7 @@ class DiscordBot(discord.Client):
|
|||||||
async def updateHumbleBundle(self):
|
async def updateHumbleBundle(self):
|
||||||
while not self.is_closed():
|
while not self.is_closed():
|
||||||
if ConfigurationHelper().getValue('humble_bundle_enable') and ConfigurationHelper().getIntValue('humble_bundle_channel') != 0 :
|
if ConfigurationHelper().getValue('humble_bundle_enable') and ConfigurationHelper().getIntValue('humble_bundle_channel') != 0 :
|
||||||
|
try :
|
||||||
response = requests.get("http://hexas.shionn.org/humble-bundle/json", headers={ "Content-Type": "application/json" })
|
response = requests.get("http://hexas.shionn.org/humble-bundle/json", headers={ "Content-Type": "application/json" })
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
bundle = response.json()
|
bundle = response.json()
|
||||||
@@ -51,6 +52,8 @@ class DiscordBot(discord.Client):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
else:
|
else:
|
||||||
logging.error(f"Erreur de connexion {response.status_code}")
|
logging.error(f"Erreur de connexion {response.status_code}")
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"Erreur de connexion {e}")
|
||||||
else:
|
else:
|
||||||
logging.info('Humble bundle est désactivé')
|
logging.info('Humble bundle est désactivé')
|
||||||
# toute les 30 minutes
|
# toute les 30 minutes
|
||||||
|
|||||||
Reference in New Issue
Block a user