Browse Source

ecowatt et getUser debug

master
nemesis 2 years ago
parent
commit
c228b3feff
  1. 8
      asmodee.py

8
asmodee.py

@ -695,7 +695,10 @@ def getMessage(message):
def getUser(message):
match = re.search(r"^(@\w+:[^ :]+)", str(message))
return str(match.group())
if match:
return str(match.group())
else:
return "personne"
def getNick(room, message): # Obtenir le DisplayName à partir du mxid.
sender = getUser(message)
@ -1633,7 +1636,8 @@ async def ecowatt(room, message):
try:
result = oauth.get(ecowatt_url)
watt = json.loads(result.text)
except:
except Exception as e:
print(e)
await msg(room, "Veuillez attendre 15 minutes", sender)
return
sign = watt["signals"]

Loading…
Cancel
Save