New unicode emoji processor

This commit is contained in:
Cadence Ember 2025-01-17 18:05:34 +13:00
commit f42eb6495f
7 changed files with 4015 additions and 46 deletions

View file

@ -20,7 +20,7 @@ async function addReaction(event) {
if (!messageID) return // Nothing can be done if the parent message was never bridged.
const key = event.content["m.relates_to"].key
const discordPreferredEncoding = emoji.encodeEmoji(key, event.content.shortcode)
const discordPreferredEncoding = await emoji.encodeEmoji(key, event.content.shortcode)
if (!discordPreferredEncoding) return
await discord.snow.channel.createReaction(channelID, messageID, discordPreferredEncoding) // acting as the discord bot itself