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))
|
||||
|
||||
def getUser(message):
|
||||
#match = re.search(r"^(@\w+:[^ :]+)", str(message))
|
||||
#if match:
|
||||
# return str(match.group())
|
||||
#else:
|
||||
# return "Quelqu'un"
|
||||
match = re.search(r"^(@\w+:[^ :]+)", str(message))
|
||||
if match:
|
||||
return str(match.group())
|
||||
else:
|
||||
try:
|
||||
return message.sender
|
||||
except:
|
||||
return "Quelqu'un"
|
||||
|
||||
|
||||
async def getNick(room, message): # Obtenir le DisplayName à partir du mxid.
|
||||
sender = getUser(message)
|
||||
|
|
|
|||
Loading…
Reference in a new issue