feat: Add emoji parsing to sync markdownToText (#136)

This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
Jacob Schlecht
2026-03-02 20:47:39 -07:00
committed by GitHub
parent 3c71fa73e8
commit 4a1b1addff
+9
View File
@@ -420,6 +420,15 @@ export class Client extends AsyncEventEmitter<Events> {
return sub;
})
.replace(RE_CUSTOM_EMOJI, (sub: string, id: string) => {
const emoji = this.emojis.get(id as string);
if (emoji) {
return `:${emoji.name}:`;
}
return sub;
})
.replace(RE_SPOILER, "<spoiler>");
}