From 085c8073cfa2b12e2d265c56abacc5218dcd856f Mon Sep 17 00:00:00 2001 From: nemesis Date: Wed, 12 Nov 2025 00:22:16 +0100 Subject: [PATCH] correction biere --- asmodee.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/asmodee.py b/asmodee.py index 0cd78e9..77fd6c0 100644 --- a/asmodee.py +++ b/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" - return message.sender + 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)