mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-06 11:57:17 +00:00
[commands] Fix EmojiConverter not working with underscore names.
This commit is contained in:
parent
a47ded6e49
commit
093d888173
@ -318,8 +318,8 @@ class EmojiConverter(IDConverter):
|
|||||||
"""Converts to a :class:`Emoji`.
|
"""Converts to a :class:`Emoji`.
|
||||||
|
|
||||||
|
|
||||||
All lookups are via the local guild. If in a DM context, then the lookup
|
All lookups are done for the local guild first, if available. If that lookup
|
||||||
is done by the global cache.
|
fails, then it checks the client's global cache.
|
||||||
|
|
||||||
The lookup strategy is as follows (in order):
|
The lookup strategy is as follows (in order):
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ class EmojiConverter(IDConverter):
|
|||||||
"""
|
"""
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def convert(self, ctx, argument):
|
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
|
result = None
|
||||||
bot = ctx.bot
|
bot = ctx.bot
|
||||||
guild = ctx.guild
|
guild = ctx.guild
|
||||||
|
Loading…
x
Reference in New Issue
Block a user