fix(MessageManager): do not use client.emojis
#7039
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the changes this PR makes and why it should be merged:
Fixes #6248
Tested with the following inputs, and all worked just fine:
message.react('<:CrowOfJudgement:697940233710338148>');
message.react(':CrowOfJudgement:697940233710338148');
message.react('CrowOfJudgement:697940233710338148');
message.react('697940233710338148');
message.react('😄');
message.react('%F0%9F%98%84');
message.react(message.guild.emojis.cache.first());
message.react({ id: '697940233710338148' });
message.react({ name: '😄' });
The only case that didn't was passing an encoded emoji inside
{ name }
, since it getsencodeURIComponent
'd twice:message.react({ name: '%F0%9F%98%84' });
However, this doesn't work in latest stable (13.3.1), so it's not breaking anything.
Question: Should I deprecate
BaseGuildEmojiManager#resolveIdentifier
? With this PR, the library will not longer use this method. However, we do not offer a public alternative (Util.resolvePartialEmoji
andUtil.parseEmoji
are both private).Status and versioning classification: