gj-boomlings-api 1.5.7 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +31 -7
- package/functions/blockUser.js +29 -30
- package/functions/deleteAccountPost.js +22 -32
- package/functions/deleteComment.js +20 -20
- package/functions/deleteLevel.js +23 -29
- package/functions/dlLevel.js +157 -6
- package/functions/dlMessage.js +30 -36
- package/functions/getAccountPosts.js +23 -36
- package/functions/getBlockedList.js +47 -63
- package/functions/getCommentHistory.js +59 -39
- package/functions/getComments.js +46 -27
- package/functions/getCreatorScores.js +18 -30
- package/functions/getDailyLevel.js +5 -9
- package/functions/getFriendsList.js +48 -56
- package/functions/getGauntlets.js +18 -24
- package/functions/getLevelByID.js +9 -156
- package/functions/getLevelScores.js +63 -46
- package/functions/getMapPacks.js +40 -28
- package/functions/getMessages.js +36 -41
- package/functions/getOfficialSongInfo.js +9 -87
- package/functions/getProfile.js +159 -7
- package/functions/getSongInfo.js +22 -31
- package/functions/getSongsLibrary.js +80 -0
- package/functions/getTab.js +16 -7
- package/functions/getTop100.js +18 -27
- package/functions/getTopLists.js +14 -0
- package/functions/getUserLevels.js +24 -88
- package/functions/getWeeklyDemon.js +5 -9
- package/functions/reportLevel.js +9 -22
- package/functions/searchLevels.js +15 -84
- package/functions/searchLists.js +15 -0
- package/functions/unblockUser.js +29 -30
- package/functions/updateLevelDesc.js +27 -43
- package/functions/uploadAccountPost.js +23 -36
- package/functions/uploadComment.js +43 -57
- package/functions/uploadMessage.js +32 -41
- package/gjReq.js +18 -0
- package/index.js +36 -1
- package/misc/GJDecode.js +210 -1
- package/misc/colors.json +1 -1
- package/misc/gauntlets.json +1 -0
- package/misc/officialsongs.json +1 -1
- package/misc/rgbToHEX.js +1 -1
- package/package.json +2 -6
- package/.nvmrc +0 -1
- package/config.json +0 -1
- package/functions/searchUsers.js +0 -27
- package/misc/decB64.js +0 -4
- package/misc/demonlist.js +0 -1
- package/misc/encB64.js +0 -1
- package/misc/gjReq.js +0 -1
- package/misc/gjWReq.js +0 -1
- package/misc/gjp.js +0 -1
- /package/{misc/xor.js → xor.js} +0 -0
|
@@ -1,68 +1,52 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: 1
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let res = await gjReq("getGJUserList20", data);
|
|
27
|
-
if(res.data == -1) throw new Error(-1);
|
|
28
|
-
if(res.data == -2) throw new Error("No players have been found in the blocklist.");
|
|
29
|
-
|
|
30
|
-
if(res.data == "error code: 1005") {
|
|
31
|
-
res = await gjWReq("getBlockedList", `${str}?password=${pass}`);
|
|
32
|
-
if(res.status == 403) throw new Error(res.data.error);
|
|
33
|
-
return res.data;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
let players = res.data.split("|");
|
|
37
|
-
let result = [];
|
|
38
|
-
|
|
39
|
-
let colors = require("../misc/colors.json");
|
|
40
|
-
const { rgbToHEX } = require("../misc/rgbToHEX.js");
|
|
41
|
-
|
|
42
|
-
players.forEach(p => {
|
|
43
|
-
let username = p.split(":")[1];
|
|
44
|
-
let playerID = p.split(":")[3];
|
|
45
|
-
let p1 = p.split(":")[7];
|
|
46
|
-
let p2 = p.split(":")[9];
|
|
47
|
-
let accID = p.split(":")[15];
|
|
48
|
-
let msg = p.split(":")[17];
|
|
49
|
-
|
|
50
|
-
let msgState = {
|
|
51
|
-
"0": "all",
|
|
52
|
-
"1": "friends",
|
|
53
|
-
"2": "none"
|
|
54
|
-
}
|
|
2
|
+
getBlockedList: async function (user, pass) {
|
|
3
|
+
if (!user) throw new Error("Please provide a player ID or username!");
|
|
4
|
+
if (!pass) throw new Error("Please provide a password!");
|
|
5
|
+
|
|
6
|
+
const { gjReq } = require("../gjReq");
|
|
7
|
+
const XOR = require("../xor");
|
|
8
|
+
const xor = new XOR;
|
|
9
|
+
|
|
10
|
+
let search = await gjReq("getGJUsers20", {
|
|
11
|
+
str: user,
|
|
12
|
+
secret: "Wmfd2893gb7"
|
|
13
|
+
});
|
|
14
|
+
if (search.data == -1) return [];
|
|
15
|
+
let accID = search.data.split(":")[21];
|
|
16
|
+
|
|
17
|
+
const data = {
|
|
18
|
+
accountID: accID,
|
|
19
|
+
gjp: xor.encrypt(pass, 37526),
|
|
20
|
+
secret: "Wmfd2893gb7",
|
|
21
|
+
type: 1
|
|
22
|
+
}
|
|
55
23
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
24
|
+
let res = await gjReq("getGJUserList20", data);
|
|
25
|
+
if (res.data == -1 || res.data == -2) return [];
|
|
26
|
+
|
|
27
|
+
let players = res.data.split("|");
|
|
28
|
+
let result = [];
|
|
29
|
+
|
|
30
|
+
let colors = require("../misc/colors.json");
|
|
31
|
+
const { rgbToHEX } = require("../misc/rgbToHEX");
|
|
32
|
+
|
|
33
|
+
players.forEach(p => {
|
|
34
|
+
let s=p.split(":");
|
|
35
|
+
let username = s[1];
|
|
36
|
+
let playerID = s[3];
|
|
37
|
+
let p1 = s[7];
|
|
38
|
+
let p2 = s[9];
|
|
39
|
+
let accID = s[15];
|
|
40
|
+
|
|
41
|
+
result.push({
|
|
42
|
+
username: username,
|
|
43
|
+
playerID: Number(playerID),
|
|
44
|
+
accountID: Number(accID),
|
|
45
|
+
color1: rgbToHEX(colors[p1]),
|
|
46
|
+
color2: rgbToHEX(colors[p2])
|
|
64
47
|
})
|
|
48
|
+
})
|
|
65
49
|
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
68
52
|
}
|
|
@@ -1,47 +1,67 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @param {*} mode - The mode of fetching the history. `0` is for recent, `1` is for most liked.
|
|
7
|
-
*/
|
|
8
|
-
getCommentHistory:
|
|
9
|
-
async function(str, page = 1, mode = 1) {
|
|
10
|
-
if(!str) throw new Error("Please provide a player ID or name!");
|
|
11
|
-
if(page && isNaN(page)) throw new Error("Please provide a page!");
|
|
12
|
-
if(mode && isNaN(mode)) throw new Error("Please provide a valid mode ID! 0 for recent, 1 for most liked.");
|
|
2
|
+
getCommentHistory: async function (str, page = 1, mode = 1) {
|
|
3
|
+
if (!str) throw new Error("Please provide a player ID or name!");
|
|
4
|
+
if (page && isNaN(page)) throw new Error("Please provide a page!");
|
|
5
|
+
if (mode && isNaN(mode)) throw new Error("Please provide a valid mode ID! 0 for recent, 1 for most liked.");
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const {getProfile} = require("./getProfile.js");
|
|
19
|
-
|
|
20
|
-
const user = await getProfile(str);
|
|
21
|
-
if(user.commentHistory != "all") throw new Error("Whoops! This user has disabled viewing his comment history!");
|
|
7
|
+
const { gjReq } = require("../gjReq.js");
|
|
8
|
+
const { getProfile } = require("./getProfile.js");
|
|
9
|
+
const { rgbToHEX } = require("../misc/rgbToHEX");
|
|
10
|
+
const colors = require("../misc/colors.json");
|
|
22
11
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
userID: user.playerID,
|
|
26
|
-
page: Number(page) - 1,
|
|
27
|
-
mode: Number(mode)
|
|
28
|
-
}
|
|
12
|
+
const user = await getProfile(str);
|
|
13
|
+
if (user.commentHistory != "all") throw new Error("Whoops! This user has disabled viewing his comment history!");
|
|
29
14
|
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
let res = await gjReq("getGJCommentHistory", {
|
|
16
|
+
secret: "Wmfd2893gb7",
|
|
17
|
+
userID: user.playerID,
|
|
18
|
+
page: Number(page) - 1,
|
|
19
|
+
mode: Number(mode)
|
|
20
|
+
});
|
|
21
|
+
if (res.data == -1) return [];
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if(res.status == 403) throw new Error(res.data.error);
|
|
36
|
-
return res.data;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let comments = res.data.split("|");
|
|
40
|
-
let result = [];
|
|
41
|
-
comments.forEach(c => {
|
|
42
|
-
result.push(decCommentFromHistory(c));
|
|
43
|
-
})
|
|
23
|
+
let comments = res.data.split("#")[0].split("|");
|
|
24
|
+
let result = [];
|
|
44
25
|
|
|
45
|
-
|
|
26
|
+
let iconObj = {
|
|
27
|
+
0: "cube",
|
|
28
|
+
1: "ship",
|
|
29
|
+
2: "ball",
|
|
30
|
+
3: "ufo",
|
|
31
|
+
4: "wave",
|
|
32
|
+
5: "robot",
|
|
33
|
+
6: "spider",
|
|
34
|
+
7: "swing",
|
|
35
|
+
8: "jetpack"
|
|
46
36
|
}
|
|
37
|
+
|
|
38
|
+
comments.forEach(c => {
|
|
39
|
+
let comment = c.split(":")[0].split("~");
|
|
40
|
+
let user = c.split(":")[1].split("~");
|
|
41
|
+
let obj = {
|
|
42
|
+
levelID: Number(comment[3]),
|
|
43
|
+
content: Buffer.from(comment[1], "base64").toString(),
|
|
44
|
+
likes: Number(comment[7]),
|
|
45
|
+
disliked: comment[7] < 0 ? true : false,
|
|
46
|
+
percent: Number(comment[9]),
|
|
47
|
+
id: Number(comment[13]),
|
|
48
|
+
age: comment[11],
|
|
49
|
+
username: user[1],
|
|
50
|
+
iconID: Number(user[3]),
|
|
51
|
+
c1: rgbToHEX(colors[user[5]]),
|
|
52
|
+
c2: rgbToHEX(colors[user[7]]),
|
|
53
|
+
iconType: iconObj[user[9]],
|
|
54
|
+
glow: Boolean(Number(user[11])),
|
|
55
|
+
playerID: Number(comment[5]),
|
|
56
|
+
accountID: Number(user[13])
|
|
57
|
+
};
|
|
58
|
+
if (comment.length > 14) {
|
|
59
|
+
obj.mod = comment[15] == "1" ? "mod" : "elder";
|
|
60
|
+
obj.color = rgbToHEX(comment[17]);
|
|
61
|
+
}
|
|
62
|
+
result.push(obj);
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
47
67
|
}
|
package/functions/getComments.js
CHANGED
|
@@ -1,41 +1,60 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
/**
|
|
3
|
-
* Gets the comments from a specified level.
|
|
4
|
-
* @param {*} level - The level ID to get the comments from.
|
|
5
|
-
* @param {*} page - The page.
|
|
6
|
-
* @param {*} mode - The mode of fetching the comments. `0` is for recent, `1` is for most liked.
|
|
7
|
-
*/
|
|
8
2
|
getComments:
|
|
9
|
-
async function(level, page = 1, mode = 1) {
|
|
10
|
-
if(
|
|
11
|
-
if(isNaN(
|
|
12
|
-
if(mode && isNaN(mode)) throw new Error("Please provide a mode ID! 0 for recent, 1 for most liked.");
|
|
3
|
+
async function (level, page = 1, mode = 1) {
|
|
4
|
+
if (isNaN(level)) throw new Error("Please provide a valid level ID!");
|
|
5
|
+
if (mode && isNaN(mode)) throw new Error("Please provide a mode ID! 0 for recent, 1 for most liked.");
|
|
13
6
|
|
|
14
|
-
const {gjReq} = require("../
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
const { decodeGJComment } = new GJDecode();
|
|
7
|
+
const { gjReq } = require("../gjReq");
|
|
8
|
+
const { rgbToHEX } = require("../misc/rgbToHEX");
|
|
9
|
+
const colors = require("../misc/colors.json");
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
let res = await gjReq("getGJComments21", {
|
|
20
12
|
levelID: level,
|
|
21
13
|
page: Number(page) - 1,
|
|
22
14
|
mode: Number(mode),
|
|
23
|
-
secret: "Wmfd2893gb7"
|
|
24
|
-
}
|
|
15
|
+
secret: "Wmfd2893gb7"
|
|
16
|
+
});
|
|
17
|
+
if (res.data == -1 || res.data.startsWith("#")) return [];
|
|
25
18
|
|
|
26
|
-
let
|
|
27
|
-
|
|
19
|
+
let comments = res.data.split("#")[0].split("|");
|
|
20
|
+
let result = [];
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
let iconObj = {
|
|
23
|
+
0: "cube",
|
|
24
|
+
1: "ship",
|
|
25
|
+
2: "ball",
|
|
26
|
+
3: "ufo",
|
|
27
|
+
4: "wave",
|
|
28
|
+
5: "robot",
|
|
29
|
+
6: "spider",
|
|
30
|
+
7: "swing",
|
|
31
|
+
8: "jetpack"
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
let comments = res.data.split("|");
|
|
36
|
-
let result = [];
|
|
33
|
+
|
|
37
34
|
comments.forEach(c => {
|
|
38
|
-
|
|
35
|
+
let comment = c.split(":")[0].split("~");
|
|
36
|
+
let user = c.split(":")[1].split("~");
|
|
37
|
+
let obj = {
|
|
38
|
+
content: Buffer.from(comment[1], "base64").toString(),
|
|
39
|
+
playerID: Number(comment[3]),
|
|
40
|
+
likes: Number(comment[5]),
|
|
41
|
+
disliked: comment[5] < 0 ? true : false,
|
|
42
|
+
percent: Number(comment[9]),
|
|
43
|
+
id: Number(comment[13]),
|
|
44
|
+
age: comment[11],
|
|
45
|
+
username: user[1],
|
|
46
|
+
iconID: Number(user[3]),
|
|
47
|
+
c1: rgbToHEX(colors[user[5]]),
|
|
48
|
+
c2: rgbToHEX(colors[user[7]]),
|
|
49
|
+
iconType: iconObj[user[9]],
|
|
50
|
+
glow: Boolean(Number(user[11])),
|
|
51
|
+
accountID: Number(user[13])
|
|
52
|
+
};
|
|
53
|
+
if (comment.length > 14) {
|
|
54
|
+
obj.mod = comment[15] == "1" ? "mod" : "elder";
|
|
55
|
+
obj.color = rgbToHEX(comment[17]);
|
|
56
|
+
}
|
|
57
|
+
result.push(obj);
|
|
39
58
|
})
|
|
40
59
|
|
|
41
60
|
return result;
|
|
@@ -1,37 +1,25 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
async function() {
|
|
7
|
-
let GJDecode = require("../misc/GJDecode.js");
|
|
8
|
-
const { decScoresUser } = new GJDecode();
|
|
9
|
-
const {gjReq} = require("../misc/gjReq.js");
|
|
10
|
-
const {gjWReq} = require("../misc/gjWReq.js");
|
|
11
|
-
const { secret } = require("../config.json");
|
|
2
|
+
getCreatorScores: async function () {
|
|
3
|
+
let GJDecode = require("../misc/GJDecode");
|
|
4
|
+
const { decodeScoresUser } = new GJDecode;
|
|
5
|
+
const { gjReq } = require("../gjReq");
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let res = await gjReq("getGJScores20", data);
|
|
20
|
-
if(res.data == "error code: 1005") {
|
|
21
|
-
res = await gjWReq("getCreatorScores");
|
|
22
|
-
return res.data;
|
|
23
|
-
}
|
|
7
|
+
const data = {
|
|
8
|
+
secret: "Wmfd2893gb7",
|
|
9
|
+
type: "creators",
|
|
10
|
+
count: 100
|
|
11
|
+
}
|
|
24
12
|
|
|
25
|
-
|
|
26
|
-
let emptyElem = players[100];
|
|
13
|
+
let res = await gjReq("getGJScores20", data);
|
|
27
14
|
|
|
28
|
-
|
|
15
|
+
let players = res.data.split("|");
|
|
16
|
+
players.pop();
|
|
29
17
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
let result = [];
|
|
19
|
+
players.forEach(p => {
|
|
20
|
+
result.push(decodeScoresUser(p));
|
|
21
|
+
});
|
|
34
22
|
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
37
25
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const { dlLevel } = require("./dlLevel.js")
|
|
8
|
-
let res = await dlLevel(-1);
|
|
9
|
-
return res;
|
|
10
|
-
}
|
|
2
|
+
getDailyLevel: async function () {
|
|
3
|
+
const { dlLevel } = require("./dlLevel")
|
|
4
|
+
let res = await dlLevel(-1);
|
|
5
|
+
return res;
|
|
6
|
+
}
|
|
11
7
|
}
|
|
@@ -1,67 +1,59 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
getFriendsList: async function (user, pass) {
|
|
3
|
+
if (!user) throw new Error("Please provide a player ID or username!");
|
|
4
|
+
if (!pass) throw new Error("Please provide a password!");
|
|
5
|
+
|
|
6
|
+
const { gjReq } = require("../gjReq");
|
|
7
|
+
const XOR = require("../xor");
|
|
8
|
+
const xor = new XOR;
|
|
9
|
+
|
|
10
|
+
let search = await gjReq("getGJUsers20", {
|
|
11
|
+
str: user,
|
|
12
|
+
secret: "Wmfd2893gb7"
|
|
13
|
+
});
|
|
14
|
+
if (search.data == -1) return [];
|
|
15
|
+
let accID = search.data.split(":")[21];
|
|
16
|
+
|
|
17
|
+
const data = {
|
|
18
|
+
accountID: accID,
|
|
19
|
+
gjp: xor.encrypt(pass, 37526),
|
|
20
|
+
secret: "Wmfd2893gb7"
|
|
21
|
+
}
|
|
11
22
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const {gjp} = require("../misc/gjp.js");
|
|
15
|
-
const { searchUsers } = require("./searchUsers.js");
|
|
23
|
+
let res = await gjReq("getGJUserList20", data);
|
|
24
|
+
if (res.data == -1 || res.data == -2) return [];
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
let players = res.data.split("|");
|
|
27
|
+
let result = [];
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
gjp: gjp(pass),
|
|
22
|
-
secret: "Wmfd2893gb7"
|
|
23
|
-
}
|
|
29
|
+
let colors = require("../misc/colors.json");
|
|
30
|
+
const { rgbToHEX } = require("../misc/rgbToHEX");
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
players.forEach(p => {
|
|
33
|
+
let s=p.split(":");
|
|
34
|
+
let username = s[1];
|
|
35
|
+
let playerID = s[3];
|
|
36
|
+
let p1 = s[7];
|
|
37
|
+
let p2 = s[9];
|
|
38
|
+
let accID = s[15];
|
|
39
|
+
let msg = s[17];
|
|
28
40
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
let msgObj = {
|
|
42
|
+
"0": "all",
|
|
43
|
+
"1": "friends",
|
|
44
|
+
"2": "none"
|
|
33
45
|
}
|
|
34
|
-
|
|
35
|
-
let players = res.data.split("|");
|
|
36
|
-
let result = [];
|
|
37
|
-
|
|
38
|
-
let colors = require("../misc/colors.json");
|
|
39
|
-
const { rgbToHEX } = require("../misc/rgbToHEX.js");
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let msgState = {
|
|
50
|
-
"0": "all",
|
|
51
|
-
"1": "friends",
|
|
52
|
-
"2": "none"
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
result.push({
|
|
56
|
-
username: username,
|
|
57
|
-
playerID: Number(playerID),
|
|
58
|
-
accountID: Number(accID),
|
|
59
|
-
color1: rgbToHEX(colors[p1]),
|
|
60
|
-
color2: rgbToHEX(colors[p2]),
|
|
61
|
-
messages: msgState[msg]
|
|
62
|
-
})
|
|
47
|
+
result.push({
|
|
48
|
+
username: username,
|
|
49
|
+
playerID: Number(playerID),
|
|
50
|
+
accountID: Number(accID),
|
|
51
|
+
color1: rgbToHEX(colors[p1]),
|
|
52
|
+
color2: rgbToHEX(colors[p2]),
|
|
53
|
+
messages: msgObj[msg]
|
|
63
54
|
})
|
|
55
|
+
})
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
67
59
|
}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
getGauntlets:
|
|
6
|
-
async function() {
|
|
7
|
-
const {gjReq} = require("../misc/gjReq.js");
|
|
8
|
-
const {gjWReq} = require("../misc/gjWReq.js");
|
|
9
|
-
let GJDecode = require("../misc/GJDecode.js");
|
|
10
|
-
const { decodeGJGauntlet } = new GJDecode();
|
|
2
|
+
getGauntlets: async function () {
|
|
3
|
+
const glIDs = require("../misc/gauntlets.json");
|
|
4
|
+
const { gjReq } = require("../gjReq");
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
secret: "Wmfd2893gb7"
|
|
14
|
-
}
|
|
6
|
+
let res = await gjReq("getGJGauntlets21", { secret: "Wmfd2893gb7", special: 1 })
|
|
15
7
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
let gauntlets = res.data.split("#")[0].split("|");
|
|
9
|
+
let result = [];
|
|
10
|
+
gauntlets.forEach(g => {
|
|
11
|
+
let arr = g.split(":")[3].split(",");
|
|
12
|
+
let list = [];
|
|
13
|
+
for (let level of arr) {
|
|
14
|
+
list.push(Number(level));
|
|
20
15
|
}
|
|
16
|
+
result.push({
|
|
17
|
+
name: `${glIDs[g.split(":")[1]]} Gauntlet`,
|
|
18
|
+
levels: list
|
|
19
|
+
});
|
|
20
|
+
})
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
gauntlets.forEach(g => {
|
|
25
|
-
result.push(decodeGJGauntlet(g));
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
30
24
|
}
|