From ebcb532c38be49853ed1b7fc240de034b4cef1a9 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 16 Dec 2015 23:46:02 -0500 Subject: Change regex from \d+ to [0-9]+ for performance reasons. \d+ includes unicode characters while [0-9]+ doesn't. --- discord/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/client.py') 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 [] -- cgit v1.2.3