This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function send(emote) { | |
return fetch(`https://static-cdn.jtvnw.net/emoticons/v1/${emote.id}/2.0`) | |
.then(res => res.blob()) | |
.then(res => { | |
const formdata = new FormData(); | |
formdata.append("image", res, `${emote.code}.png`); | |
formdata.append("emoji", JSON.stringify({creator_id:"CREATOR_ID",name: emote.code})); | |
return fetch("https://mattermost.com/api/v4/emoji", { | |
method: "post", |