Render global emotes

This commit is contained in:
Jeremy Zhang 2017-09-06 06:42:17 +00:00
parent 84d3a7ad84
commit 315173924c

View File

@ -670,6 +670,8 @@
var rendered = Mustache.render(template, {"id": emoji.id, "name": emoji.name}).trim();
message.content = message.content.replaceAll(emoji_format, rendered);
}
var rendered = Mustache.render(template, {"id": "$2", "name": "$1"}).trim();
message.content = message.content.replace(/<:(.*?):(.*?)>/g, rendered);
return message;
}