Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

Viewing file on branch master

1text := import("text")
2
3// if we're not sending to a discord bridge,
4// then convert custom emoji tags into url's
5if (inProtocol == "discord" && outProtocol != "discord") {
6 rePNG := text.re_compile(`<:.*?:([0-9]+)>`)
7 msgText=rePNG.replace(msgText,"https://cdn.discordapp.com/emojis/$1.png")
8 reGIF := text.re_compile(`<a:.*?:([0-9]+)>`)
9 msgText=reGIF.replace(msgText,"https://cdn.discordapp.com/emojis/$1.gif")
10}
11