diff options
| author | Rapptz <[email protected]> | 2015-12-16 23:46:02 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-16 23:46:02 -0500 |
| commit | ebcb532c38be49853ed1b7fc240de034b4cef1a9 (patch) | |
| tree | bad1175fbc847fa4bf08f5f9db6e9346af34958c /discord/client.py | |
| parent | Add Server.me attribute to access the Member version of Client.user. (diff) | |
| download | discord.py-ebcb532c38be49853ed1b7fc240de034b4cef1a9.tar.xz discord.py-ebcb532c38be49853ed1b7fc240de034b4cef1a9.zip | |
Change regex from \d+ to [0-9]+ for performance reasons.
\d+ includes unicode characters while [0-9]+ doesn't.
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index 64ceb8c9..ed87c0e6 100644 --- a/discord/client.py +++ b/discord/client.py @@ -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 [] |