diff options
| author | Rapptz <[email protected]> | 2016-04-22 19:27:40 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-04-23 02:13:34 -0400 |
| commit | e0ca746ad4d32059ef5f48f9124ed5523a077821 (patch) | |
| tree | b0d580777f80004472fe2a813e7555e8fcc2f4e4 | |
| parent | Message.clean_content now takes into consideration @here mentions. (diff) | |
| download | discord.py-e0ca746ad4d32059ef5f48f9124ed5523a077821.tar.xz discord.py-e0ca746ad4d32059ef5f48f9124ed5523a077821.zip | |
[commands] Make sure that mentions are the entire string.
| -rw-r--r-- | discord/ext/commands/core.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 564d4664..b308bbc1 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -155,7 +155,7 @@ class Command: return result def _convert_member(self, bot, message, argument): - match = re.match(r'<@([0-9]+)>', argument) + match = re.match(r'<@([0-9]+)>$', argument) server = message.server result = None if match is None: @@ -179,7 +179,7 @@ class Command: _convert_user = _convert_member def _convert_channel(self, bot, message, argument): - match = re.match(r'<#([0-9]+)>', argument) + match = re.match(r'<#([0-9]+)>$', argument) result = None server = message.server if match is None: |