瀏覽代碼

fix: escape backslash

TheHamkerCat 2 年之前
父節點
當前提交
971dca2cb4
共有 1 個文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      wbb/modules/admin.py

+ 2 - 2
wbb/modules/admin.py

@@ -368,7 +368,7 @@ async def list_ban_(c, message: Message):
     )
     try:
         msgtext = (await app.get_messages(uname, mid)).text
-        gusernames = re.findall(r"@\w+", msgtext)
+        gusernames = re.findall(r"@\\w+", msgtext)
     except:
         return await m.edit_text("Could not get group usernames")
     count = 0
@@ -417,7 +417,7 @@ async def list_unban_(c, message: Message):
     )
     try:
         msgtext = (await app.get_messages(uname, mid)).text
-        gusernames = re.findall(r"@\w+", msgtext)
+        gusernames = re.findall(r"@\\w+", msgtext)
     except:
         return await m.edit_text("Could not get the group usernames")
     count = 0