diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 155b1a4e2..adec41dcd 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -254,12 +254,11 @@ class MessageConverter(Converter): .. versionchanged:: 1.5 Raise :exc:`.ChannelNotFound`, `MessageNotFound` or `ChannelNotReadable` instead of generic :exc:`.BadArgument` """ - async def convert(self, ctx, argument): - id_regex = re.compile(r'^(?:(?P[0-9]{15,21})-)?(?P[0-9]{15,21})$') + id_regex = re.compile(r'(?:(?P[0-9]{15,21})-)?(?P[0-9]{15,21})$') link_regex = re.compile( - r'^https?://(?:(ptb|canary)\.)?discord(?:app)?\.com/channels/' - r'(?:([0-9]{15,21})|(@me))' + r'https?://(?:(ptb|canary|www)\.)?discord(?:app)?\.com/channels/' + r'(?:[0-9]{15,21}|@me)' r'/(?P[0-9]{15,21})/(?P[0-9]{15,21})/?$' ) match = id_regex.match(argument) or link_regex.match(argument)