diff options
| author | Rapptz <[email protected]> | 2017-05-26 18:58:56 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-05-26 18:58:56 -0400 |
| commit | 093d88817332d871f0fc5306d0364c705d957fda (patch) | |
| tree | d8a42a391ae933c24ccaed88463749d579a186be | |
| parent | Don't expose Client.messages (diff) | |
| download | discord.py-093d88817332d871f0fc5306d0364c705d957fda.tar.xz discord.py-093d88817332d871f0fc5306d0364c705d957fda.zip | |
[commands] Fix EmojiConverter not working with underscore names.
| -rw-r--r-- | discord/ext/commands/converter.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 4bd2fd74..62aa8e81 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -318,8 +318,8 @@ class EmojiConverter(IDConverter): """Converts to a :class:`Emoji`. - All lookups are via the local guild. If in a DM context, then the lookup - is done by the global cache. + All lookups are done for the local guild first, if available. If that lookup + fails, then it checks the client's global cache. The lookup strategy is as follows (in order): @@ -329,7 +329,7 @@ class EmojiConverter(IDConverter): """ @asyncio.coroutine def convert(self, ctx, argument): - match = self._get_id_match(argument) or re.match(r'<:[a-zA-Z0-9]+:([0-9]+)>$', argument) + match = self._get_id_match(argument) or re.match(r'<:[a-zA-Z0-9\_]+:([0-9]+)>$', argument) result = None bot = ctx.bot guild = ctx.guild |