mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
refactor: new node features (#5132)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
@@ -67,7 +67,7 @@ class BaseGuildEmojiManager extends BaseManager {
|
||||
if (emoji instanceof ReactionEmoji) return emoji.identifier;
|
||||
if (typeof emoji === 'string') {
|
||||
const res = parseEmoji(emoji);
|
||||
if (res && res.name.length) {
|
||||
if (res?.name.length) {
|
||||
emoji = `${res.animated ? 'a:' : ''}${res.name}${res.id ? `:${res.id}` : ''}`;
|
||||
}
|
||||
if (!emoji.includes('%')) return encodeURIComponent(emoji);
|
||||
|
||||
Reference in New Issue
Block a user