fix emoji cache not being updated after successive remove calls

This commit is contained in:
io 2021-06-23 04:39:01 +00:00
parent f508085e29
commit fdba482d8b
1 changed files with 4 additions and 0 deletions

View File

@ -546,6 +546,10 @@ class Emotes(commands.Cog):
await context.send(f'{emote.name}: {emote.url}')
async def parse_emote(self, context, name_or_emote, *, local=True):
# this function is mostly synchronous,
# so we yield in order to let the emoji cache update between repeated calls
await asyncio.sleep(0)
match = utils.emote.RE_CUSTOM_EMOTE.match(name_or_emote)
if match:
id = int(match['id'])