generated from Nemesis/Exemple
correction biere
This commit is contained in:
parent
549f91b92c
commit
085c8073cf
1 changed files with 9 additions and 6 deletions
13
asmodee.py
13
asmodee.py
|
|
@ -700,12 +700,15 @@ def getMessage(message):
|
||||||
return(str(message))
|
return(str(message))
|
||||||
|
|
||||||
def getUser(message):
|
def getUser(message):
|
||||||
#match = re.search(r"^(@\w+:[^ :]+)", str(message))
|
match = re.search(r"^(@\w+:[^ :]+)", str(message))
|
||||||
#if match:
|
if match:
|
||||||
# return str(match.group())
|
return str(match.group())
|
||||||
#else:
|
else:
|
||||||
# return "Quelqu'un"
|
try:
|
||||||
return message.sender
|
return message.sender
|
||||||
|
except:
|
||||||
|
return "Quelqu'un"
|
||||||
|
|
||||||
|
|
||||||
async def getNick(room, message): # Obtenir le DisplayName à partir du mxid.
|
async def getNick(room, message): # Obtenir le DisplayName à partir du mxid.
|
||||||
sender = getUser(message)
|
sender = getUser(message)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue