mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Change regex from \d+ to [0-9]+ for performance reasons.
\d+ includes unicode characters while [0-9]+ doesn't.
This commit is contained in:
1 parent
4f66d41ca3
commit
ebcb532c38
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -206,7 +206,7 @@ class Client:
|
||||
if isinstance(mentions, list):
|
||||
return [user.id for user in mentions]
|
||||
elif mentions == True:
|
||||
return re.findall(r'<@(\d+)>', content)
|
||||
return re.findall(r'<@([0-9]+)>', content)
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
Reference in new issue
Block a user