diff --git a/src/systems/emojis.ts b/src/systems/emojis.ts index 7092497..88f1cf3 100644 --- a/src/systems/emojis.ts +++ b/src/systems/emojis.ts @@ -87,15 +87,20 @@ _map = null; }, + // resolveTokens(text: string): string { + // return text + // // Handle <:key:> or <:key:123456> format + // .replace(/<:([^:]+):(?:\d*)?>/g, (_, key) => Emoji.get(key) || `<:${key}:>`) + // // Handle :key: format (simpler notation in update JSONs) + // .replace(/:([a-z0-9_]+):/g, (match, key) => { + // const emoji = Emoji.get(key); + // return emoji || match; // leave as-is if not found + // }); + // }, + resolveTokens(text: string): string { - return text - // Handle <:key:> or <:key:123456> format - .replace(/<:([^:]+):(?:\d*)?>/g, (_, key) => Emoji.get(key) || `<:${key}:>`) - // Handle :key: format (simpler notation in update JSONs) - .replace(/:([a-z0-9_]+):/g, (match, key) => { - const emoji = Emoji.get(key); - return emoji || match; // leave as-is if not found - }); + // Only replace <:key:> pattern (no ID) — leave real Discord emojis untouched + return text.replace(/<:([^:]+):>/g, (_, key) => Emoji.get(key) || `<:${key}:>`); }, // resolveTokens(text: string): string {