-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
37 lines (35 loc) · 965 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const fs = require("fs");
let emotes = new Map();
fs.readFile("forsen_bttv.json", function (err, data) {
let jsonData = data;
let jsonParsed = JSON.parse(jsonData);
for (let i = 0; i <= 93; i++) {
emotes.set(
"`" + jsonParsed.sharedEmotes[i].code + "`",
"`" +
`https://cdn.betterttv.net/emote/${jsonParsed.sharedEmotes[i].id}/1x` +
"`"
);
}
});
fs.readFile("ffz_forsen.json", function (err, data) {
let jsonData = data;
let jsonParsed = JSON.parse(jsonData);
for (let i = 0; i <= 49; i++) {
let emoteUrl = jsonParsed.emoticons[i].urls[1];
emoteUrl = emoteUrl.slice(2);
emotes.set(
"`" + jsonParsed.emoticons[i].name + "`",
"`" + "https://" + emoteUrl + "`"
);
}
});
let query;
setTimeout(() => {
emotes.forEach(function (value, key) {
query = "[" + key + "," + value + "],";
fs.appendFile("emotes.js", query, function () {
console.log("...");
});
});
}, 1000);