[commands] Make sure that mentions are the entire string.

This commit is contained in:
Rapptz 2016-04-22 19:27:40 -04:00
parent 54e9be7aed
commit e0ca746ad4

View File

@ -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: