From a1231001a72ee5bd61fd7368137fb0a5b4d19ce7 Mon Sep 17 00:00:00 2001 From: c0ncord <59654954+c0ncord@users.noreply.github.com> Date: Wed, 8 Jan 2020 16:20:54 +0000 Subject: [PATCH] move stripCustomoji logic to default Tengo script Removing the image ID from the message (without any possibility of recovering it later) is a loss of valuable data that prevents users from giving support to custom emoji via Tengo scripts. --- internal/tengo/outmessage.tengo | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/tengo/outmessage.tengo b/internal/tengo/outmessage.tengo index 2cbb8a22..d678e056 100644 --- a/internal/tengo/outmessage.tengo +++ b/internal/tengo/outmessage.tengo @@ -17,3 +17,9 @@ if inProtocol == "irc" && outProtocol != "irc" { msgText=re.replace(msgText,"") } // end - strip irc colors + +// strip custom emoji +if inProtocol == "discord" { + re := text.re_compile(``) + msgText=re.replace(msgText,"$1") +}