commit 526e1738e2792a69e080a71c3d66d3a2a6830941
Author: rani <clagv.randomgames@gmail.com>
Date: Tue May 12 15:47:15 2026 +0000
diff --git a/scripts/outmessage.tengo b/scripts/outmessage.tengo
index 7a0897e..46f14d6 100644
--- a/scripts/outmessage.tengo
+++ b/scripts/outmessage.tengo
@@ -6410 +6416 @@ if inProtocol == "irc" && outProtocol != "irc" {
// if we're not sending to a discord bridge,
// then convert custom emoji tags into url's
if (inProtocol == "discord" && outProtocol != "discord") {
- rePNG := text.re_compile(`<:.*?:([0-9]+)>`)
- msgText=rePNG.replace(msgText,"https://cdn.discordapp.com/emojis/$1.png")
- reGIF := text.re_compile(`<a:.*?:([0-9]+)>`)
- msgText=reGIF.replace(msgText,"https://cdn.discordapp.com/emojis/$1.gif")
+ rePNG := text.re_compile(`<:.*?:([0-9]+)>`)
+ msgText = rePNG.replace(msgText,"https://cdn.discordapp.com/emojis/$1.png")
+ reGIF := text.re_compile(`<a:.*?:([0-9]+)>`)
+ msgText = reGIF.replace(msgText,"https://cdn.discordapp.com/emojis/$1.gif")
+}
+
+// convert emoji URLs back into the emojis themselves on discord
+if (inProtocol != "discord" && outProtocol == "discord") {
+ rePNG := text.re_compile(`https://cdn\.discordapp\.com/emojis/([0-9]+)\.png`)
+ msgText = rePNG.replace(msgText, "<:_:$1>")
}
// format replies from all protocols to all protocols