gj-boomlings-api 0.2.0 → 0.4.0

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.
Files changed (39) hide show
  1. package/README.md +9 -44
  2. package/config.json +1 -1
  3. package/docs/dlLevel.md +52 -0
  4. package/docs/getAccountPosts.md +71 -0
  5. package/docs/getCommentHistory.md +123 -0
  6. package/docs/getComments.md +113 -0
  7. package/docs/getDailyLevel.md +17 -0
  8. package/docs/getGauntlets.md +81 -0
  9. package/docs/getOfficialSongInfo.md +25 -0
  10. package/docs/getProfile.md +36 -0
  11. package/docs/getSongInfo.md +26 -0
  12. package/docs/getWeeklyDemon.md +17 -0
  13. package/docs/objects/acc_comment.md +19 -0
  14. package/docs/objects/comment.md +34 -0
  15. package/docs/objects/level.md +95 -0
  16. package/docs/objects/song.md +28 -0
  17. package/docs/objects/user.md +61 -0
  18. package/docs/reportLevel.md +19 -0
  19. package/docs/uploadAccountPost.md +27 -0
  20. package/functions/decURLSafeBase64.js +1 -1
  21. package/functions/dlLevel.js +7 -7
  22. package/functions/encURLSafeBase64.js +2 -2
  23. package/functions/getAccountPosts.js +147 -0
  24. package/functions/getCommentHistory.js +146 -0
  25. package/functions/getComments.js +106 -14
  26. package/functions/getGauntlets.js +55 -0
  27. package/functions/getOfficialSongInfo.js +1 -1
  28. package/functions/getProfile.js +4 -4
  29. package/functions/getSongInfo.js +3 -3
  30. package/functions/reportLevel.js +4 -4
  31. package/functions/uploadAccountPost.js +53 -0
  32. package/index.js +9 -3
  33. package/misc/decCommentFromHistory.js +31 -0
  34. package/misc/decodeAccountPost.js +18 -0
  35. package/misc/decodeGJComment.js +2 -8
  36. package/misc/decodeGJGauntlet.js +45 -0
  37. package/misc/officialsongs.json +0 -39
  38. package/package.json +1 -2
  39. package/functions/getLevelData.js +0 -30
@@ -1,8 +1,10 @@
1
1
  module.exports = {
2
2
  getComments:
3
3
  async function(level, page = 1, mode = 1) {
4
+ if(!level || level == "") throw new Error("Please provide a level ID!");
5
+ if(isNaN(level)) throw new Error("A level ID should be a number.");
4
6
  const axios = require("axios");
5
- const {headers} = require("../config.json");
7
+ const {headers, server} = require("../config.json");
6
8
  const { decodeGJComment } = require("../misc/decodeGJComment.js");
7
9
 
8
10
  const data = {
@@ -15,22 +17,112 @@ module.exports = {
15
17
  gdw: 0
16
18
  }
17
19
 
18
- let res = await axios.post("http://www.boomlings.com/database/getGJComments21.php", data, {
20
+ let res = await axios.post(server + "getGJComments21.php", data, {
19
21
  headers: headers
20
22
  })
21
23
 
22
- const firstComment = res.data.split("|")[0];
23
- const secondComment = res.data.split("|")[1].split("|")[0];
24
- const thirdComment = res.data.split("|")[2].split("|")[0];
25
- const fourthComment = res.data.split("|")[3].split("|")[0];
26
- const fifthComment = res.data.split("|")[4].split("|")[0];
27
- const sixthComment = res.data.split("|")[5].split("|")[0];
28
- const seventhComment = res.data.split("|")[6].split("|")[0];
29
- const eighthComment = res.data.split("|")[7].split("|")[0];
30
- const ninthComment = res.data.split("|")[8].split("|")[0];
31
- const tenthComment = res.data.split("|")[9].split("|")[0];
32
-
33
- const result = [decodeGJComment(firstComment),decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment),decodeGJComment(sixthComment),decodeGJComment(seventhComment),decodeGJComment(eighthComment),decodeGJComment(ninthComment),decodeGJComment(tenthComment)]
24
+ let firstComment = res.data;
25
+ let secondComment;
26
+ let thirdComment;
27
+ let fourthComment;
28
+ let fifthComment;
29
+ let sixthComment;
30
+ let seventhComment;
31
+ let eighthComment;
32
+ let ninthComment;
33
+ let tenthComment;
34
+
35
+ let result = [decodeGJComment(firstComment)]
36
+
37
+ if(res.data.split("|").length - 1 == 1) {
38
+ firstComment = res.data.split("|")[0];
39
+ secondComment = res.data.split("|")[1].split("|")[0];
40
+ result.push(decodeGJComment(secondComment))
41
+ }
42
+
43
+ if(res.data.split("|").length - 1 == 2) {
44
+ firstComment = res.data.split("|")[0];
45
+ secondComment = res.data.split("|")[1].split("|")[0];
46
+ thirdComment = res.data.split("|")[2].split("|")[0];
47
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment))
48
+ }
49
+
50
+ if(res.data.split("|").length - 1 == 3) {
51
+ firstComment = res.data.split("|")[0];
52
+ secondComment = res.data.split("|")[1].split("|")[0];
53
+ thirdComment = res.data.split("|")[2].split("|")[0];
54
+ fourthComment = res.data.split("|")[3].split("|")[0];
55
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment))
56
+ }
57
+
58
+ if(res.data.split("|").length - 1 == 4) {
59
+ firstComment = res.data.split("|")[0];
60
+ secondComment = res.data.split("|")[1].split("|")[0];
61
+ thirdComment = res.data.split("|")[2].split("|")[0];
62
+ fourthComment = res.data.split("|")[3].split("|")[0];
63
+ fifthComment = res.data.split("|")[4].split("|")[0];
64
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment))
65
+ }
66
+
67
+ if(res.data.split("|").length - 1 == 5) {
68
+ firstComment = res.data.split("|")[0];
69
+ secondComment = res.data.split("|")[1].split("|")[0];
70
+ thirdComment = res.data.split("|")[2].split("|")[0];
71
+ fourthComment = res.data.split("|")[3].split("|")[0];
72
+ fifthComment = res.data.split("|")[4].split("|")[0];
73
+ sixthComment = res.data.split("|")[5].split("|")[0];
74
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment),decodeGJComment(sixthComment))
75
+ }
76
+
77
+ if(res.data.split("|").length - 1 == 6) {
78
+ firstComment = res.data.split("|")[0];
79
+ secondComment = res.data.split("|")[1].split("|")[0];
80
+ thirdComment = res.data.split("|")[2].split("|")[0];
81
+ fourthComment = res.data.split("|")[3].split("|")[0];
82
+ fifthComment = res.data.split("|")[4].split("|")[0];
83
+ sixthComment = res.data.split("|")[5].split("|")[0];
84
+ seventhComment = res.data.split("|")[6].split("|")[0];
85
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment),decodeGJComment(sixthComment),decodeGJComment(seventhComment))
86
+ }
87
+
88
+ if(res.data.split("|").length - 1 == 7) {
89
+ firstComment = res.data.split("|")[0];
90
+ secondComment = res.data.split("|")[1].split("|")[0];
91
+ thirdComment = res.data.split("|")[2].split("|")[0];
92
+ fourthComment = res.data.split("|")[3].split("|")[0];
93
+ fifthComment = res.data.split("|")[4].split("|")[0];
94
+ sixthComment = res.data.split("|")[5].split("|")[0];
95
+ seventhComment = res.data.split("|")[6].split("|")[0];
96
+ eighthComment = res.data.split("|")[7].split("|")[0];
97
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment),decodeGJComment(sixthComment),decodeGJComment(seventhComment),decodeGJComment(eighthComment))
98
+ }
99
+
100
+ if(res.data.split("|").length - 1 == 8) {
101
+ firstComment = res.data.split("|")[0];
102
+ secondComment = res.data.split("|")[1].split("|")[0];
103
+ thirdComment = res.data.split("|")[2].split("|")[0];
104
+ fourthComment = res.data.split("|")[3].split("|")[0];
105
+ fifthComment = res.data.split("|")[4].split("|")[0];
106
+ sixthComment = res.data.split("|")[5].split("|")[0];
107
+ seventhComment = res.data.split("|")[6].split("|")[0];
108
+ eighthComment = res.data.split("|")[7].split("|")[0];
109
+ ninthComment = res.data.split("|")[8].split("|")[0];
110
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment),decodeGJComment(sixthComment),decodeGJComment(seventhComment),decodeGJComment(eighthComment),decodeGJComment(ninthComment))
111
+ }
112
+
113
+ if(res.data.split("|").length - 1 == 9) {
114
+ firstComment = res.data.split("|")[0];
115
+ secondComment = res.data.split("|")[1].split("|")[0];
116
+ thirdComment = res.data.split("|")[2].split("|")[0];
117
+ fourthComment = res.data.split("|")[3].split("|")[0];
118
+ fifthComment = res.data.split("|")[4].split("|")[0];
119
+ sixthComment = res.data.split("|")[5].split("|")[0];
120
+ seventhComment = res.data.split("|")[6].split("|")[0];
121
+ eighthComment = res.data.split("|")[7].split("|")[0];
122
+ ninthComment = res.data.split("|")[8].split("|")[0];
123
+ tenthComment = res.data.split("|")[9].split("|")[0];
124
+ result.push(decodeGJComment(secondComment),decodeGJComment(thirdComment),decodeGJComment(fourthComment),decodeGJComment(fifthComment),decodeGJComment(sixthComment),decodeGJComment(seventhComment),decodeGJComment(eighthComment),decodeGJComment(ninthComment),decodeGJComment(tenthComment))
125
+ }
34
126
 
35
127
  return result;
36
128
  }
@@ -0,0 +1,55 @@
1
+ module.exports = {
2
+ getGauntlets:
3
+ async function() {
4
+ const axios = require('axios');
5
+ const {headers, server} = require("../config.json");
6
+ const { decodeGJGauntlet } = require("../misc/decodeGJGauntlet.js")
7
+
8
+ const data = {
9
+ secret: "Wmfd2893gb7",
10
+ gameVersion: 21,
11
+ binaryVersion: 35,
12
+ gdw: 0
13
+ }
14
+
15
+ let res = await axios.post(server + "getGJGauntlets21.php", data, {
16
+ headers: headers
17
+ })
18
+
19
+ let first = res.data.split("|")[0];
20
+ let second = res.data.split("|")[1].split("|")[0];
21
+ let third = res.data.split("|")[2].split("|")[0];
22
+ let fourth = res.data.split("|")[3].split("|")[0];
23
+ let fifth = res.data.split("|")[4].split("|")[0];
24
+ let sixth = res.data.split("|")[5].split("|")[0];
25
+ let seventh = res.data.split("|")[6].split("|")[0];
26
+ let eighth = res.data.split("|")[7].split("|")[0];
27
+ let ninth = res.data.split("|")[8].split("|")[0];
28
+ let tenth = res.data.split("|")[9].split("|")[0];
29
+ let eleventh = res.data.split("|")[10].split("|")[0];
30
+ let twelfth = res.data.split("|")[11].split("|")[0];
31
+ let thirteenth = res.data.split("|")[12].split("|")[0];
32
+ let fourteenth = res.data.split("|")[13].split("|")[0];
33
+ let fifteenth = res.data.split("|")[14].split("|")[0];
34
+
35
+ const result = [
36
+ decodeGJGauntlet(first),
37
+ decodeGJGauntlet(second),
38
+ decodeGJGauntlet(third),
39
+ decodeGJGauntlet(fourth),
40
+ decodeGJGauntlet(fifth),
41
+ decodeGJGauntlet(sixth),
42
+ decodeGJGauntlet(seventh),
43
+ decodeGJGauntlet(eighth),
44
+ decodeGJGauntlet(ninth),
45
+ decodeGJGauntlet(tenth),
46
+ decodeGJGauntlet(eleventh),
47
+ decodeGJGauntlet(twelfth),
48
+ decodeGJGauntlet(thirteenth),
49
+ decodeGJGauntlet(fourteenth),
50
+ decodeGJGauntlet(fifteenth),
51
+ ]
52
+
53
+ return result;
54
+ }
55
+ }
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  getOfficialSongInfo:
3
3
  function(song) {
4
- if(!song) throw new Error("Please provide a song ID.");
4
+ if(!song || song == "") throw new Error("Please provide a song ID.");
5
5
  if(isNaN(song)) throw new Error("A song ID must be a number.");
6
6
  const {
7
7
  sm,
@@ -1,9 +1,9 @@
1
1
  module.exports = {
2
2
  getProfile:
3
3
  async function(str) {
4
- if(!str) throw new Error("Please provide a user ID or name!");
4
+ if(!str || str == "") throw new Error("Please provide a user ID or name!");
5
5
  const axios = require("axios");
6
- const { headers } = require("../config.json");
6
+ const { headers, server } = require("../config.json");
7
7
 
8
8
  const data = {
9
9
  gameVersion: 21,
@@ -13,7 +13,7 @@ module.exports = {
13
13
  secret: "Wmfd2893gb7"
14
14
  };
15
15
 
16
- let r = await axios.post("http://www.boomlings.com/database/getGJUsers20.php", data, {
16
+ let r = await axios.post(server + "getGJUsers20.php", data, {
17
17
  headers: headers
18
18
  })
19
19
 
@@ -28,7 +28,7 @@ module.exports = {
28
28
  secret: "Wmfd2893gb7"
29
29
  };
30
30
 
31
- let res = await axios.post("http://www.boomlings.com/database/getGJUserInfo20.php", GJUI20data, {
31
+ let res = await axios.post(server + "getGJUserInfo20.php", GJUI20data, {
32
32
  headers: headers
33
33
  })
34
34
 
@@ -1,17 +1,17 @@
1
1
  module.exports = {
2
2
  getSongInfo:
3
3
  async function(song) {
4
- if(!song) throw new Error("Please provide a song ID.");
4
+ if(!song || song == "") throw new Error("Please provide a song ID.");
5
5
  if(isNaN(song)) throw new Error("A song ID must be a number.")
6
6
  const axios = require("axios")
7
- const {headers} = require("../config.json")
7
+ const {headers, server} = require("../config.json")
8
8
 
9
9
  const data = {
10
10
  songID: song,
11
11
  secret: "Wmfd2893gb7"
12
12
  }
13
13
 
14
- let res = await axios.post('http://www.boomlings.com/database/getGJSongInfo.php', data, {
14
+ let res = await axios.post(server + 'getGJSongInfo.php', data, {
15
15
  headers: headers
16
16
  })
17
17
 
@@ -1,18 +1,18 @@
1
1
  module.exports = {
2
2
  reportLevel:
3
3
  async function(level) {
4
- if(!level) throw new Error("Please provide a level ID.");
4
+ if(!level || level == "") throw new Error("Please provide a level ID.");
5
5
  if(isNaN(Number(level))) throw new Error("The level ID should be a number.");
6
6
 
7
7
  const axios = require("axios")
8
- const {headers} = require("../config.json");
8
+ const {headers, server} = require("../config.json");
9
9
 
10
10
  const data = {
11
- levelID: Number(level),
11
+ levelID: level.toString().trim(),
12
12
  secret: "Wmfd2893gb7"
13
13
  }
14
14
 
15
- let res = await axios.post("http://www.boomlings.com/database/reportGJLevel.php", data, {
15
+ let res = await axios.post(server + "reportGJLevel.php", data, {
16
16
  headers: headers
17
17
  })
18
18
 
@@ -0,0 +1,53 @@
1
+ module.exports = {
2
+ uploadAccountPost:
3
+ async function(content, str, password) {
4
+ const {encURLSafeBase64} = require("./encURLSafeBase64.js");
5
+ if(!content || content == "") throw new Error("Please provide an account post content!");
6
+ if(!str || str == "") throw new Error("Please provide a user ID or name!");
7
+ if(!password || password == "") throw new Error("Please provide a password!");
8
+ const axios = require("axios");
9
+ const { headers, server } = require("../config.json");
10
+
11
+ const data = {
12
+ gameVersion: 21,
13
+ binaryVersion: 35,
14
+ gdw: 0,
15
+ str: str,
16
+ secret: "Wmfd2893gb7"
17
+ };
18
+
19
+ let r = await axios.post(server + "getGJUsers20.php", data, {
20
+ headers: headers
21
+ })
22
+
23
+ if(r.data == -1) throw new Error("-1 This user is not found.")
24
+ let id = r.data.split(":16:")[1].split(":3:")[0];
25
+ if(Number(id) < 71 || id.includes(":")) id = r.data.split(":16:")[2].split(":3:")[0];
26
+
27
+ const XOR = require("../misc/xor.js");
28
+ const xor = new XOR();
29
+
30
+ const comment = encURLSafeBase64(content);
31
+
32
+ let uACdata = {
33
+ gameVersion: 21,
34
+ binaryVersion: 35,
35
+ gdw: 0,
36
+ accountID: id,
37
+ secret: "Wmfd2893gb7",
38
+ gjp: xor.encrypt(password, 37526),
39
+ comment: comment,
40
+ cType: 1
41
+ };
42
+
43
+ let res = await axios.post(server + "uploadGJAccComment20.php", uACdata, {
44
+ headers: headers
45
+ }).catch(e => {
46
+ if(e.response.status == 500) throw new Error("500 Error: couldn't post!");
47
+ })
48
+
49
+ if(res.data.toString().toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
50
+
51
+ return 1;
52
+ }
53
+ }
package/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const { dlLevel } = require("./functions/dlLevel.js");
2
- const { getLevelData } = require("./functions/getLevelData.js");
3
2
  const { getSongInfo } = require("./functions/getSongInfo.js");
4
3
  const { getOfficialSongInfo } = require("./functions/getOfficialSongInfo.js");
5
4
  const { decURLSafeBase64 } = require("./functions/decURLSafeBase64.js");
@@ -9,9 +8,12 @@ const { getWeeklyDemon } = require("./functions/getWeeklyDemon.js");
9
8
  const { getProfile } = require("./functions/getProfile.js");
10
9
  const { reportLevel } = require("./functions/reportLevel.js");
11
10
  const { getComments } = require("./functions/getComments.js");
11
+ const { getCommentHistory } = require("./functions/getCommentHistory.js");
12
+ const { getGauntlets } = require("./functions/getGauntlets.js");
13
+ const { getAccountPosts } = require("./functions/getAccountPosts.js");
14
+ const { uploadAccountPost } = require("./functions/uploadAccountPost.js");
12
15
 
13
16
  module.exports.dlLevel = dlLevel;
14
- module.exports.getLevelData = getLevelData;
15
17
  module.exports.getSongInfo = getSongInfo;
16
18
  module.exports.getOfficialSongInfo = getOfficialSongInfo;
17
19
  module.exports.decURLSafeBase64 = decURLSafeBase64;
@@ -20,4 +22,8 @@ module.exports.getDailyLevel = getDailyLevel;
20
22
  module.exports.getWeeklyDemon = getWeeklyDemon;
21
23
  module.exports.getProfile = getProfile;
22
24
  module.exports.reportLevel = reportLevel;
23
- module.exports.getComments = getComments;
25
+ module.exports.getComments = getComments;
26
+ module.exports.getCommentHistory = getCommentHistory;
27
+ module.exports.getGauntlets = getGauntlets;
28
+ module.exports.getAccountPosts = getAccountPosts;
29
+ module.exports.uploadAccountPost = uploadAccountPost;
@@ -0,0 +1,31 @@
1
+ module.exports = {
2
+ decCommentFromHistory:
3
+ function(comment) {
4
+ const bs = require("js-base64");
5
+
6
+ let levelID = comment.split("~1~")[1].split("~3~")[0];
7
+ let commentContent = comment.split("2~")[1].split("~1~")[0];
8
+ let playerID = comment.split("~3~")[1].split("~4~")[0];
9
+ let likes = comment.split("~4~")[1].split("~10~")[0];
10
+ let percent = comment.split("~10~")[1].split("~9~")[0];
11
+ let age = comment.split("~9~")[1].split("~6~")[0];
12
+ let messageID = comment.split("~6~")[1].split(":1~")[0];
13
+ let username = comment.split(":1~")[1].split("~9~")[0];
14
+
15
+ if(messageID.includes("~")) messageID = comment.split("~6~")[1].split("~11~")[0];
16
+ if(playerID.includes("~")) playerID = comment.split("~3~")[1].split("~4~")[0].split("~")[0];
17
+
18
+ const res = {
19
+ username: username,
20
+ content: bs.decode(commentContent.replace(/_/g, '/').replace(/-/g, '+')),
21
+ levelID: Number(levelID),
22
+ playerID: Number(playerID),
23
+ likes: Number(likes),
24
+ percent: Number(percent),
25
+ id: Number(messageID),
26
+ age: age
27
+ }
28
+
29
+ return res;
30
+ }
31
+ }
@@ -0,0 +1,18 @@
1
+ module.exports = {
2
+ decodeAccountPost:
3
+ function(post) {
4
+ const bs = require("js-base64");
5
+
6
+ let postContent = post.split("2~")[1].split("~4~")[0];
7
+ let likes = post.split("~4~")[1].split("~9~")[0];
8
+ let age = post.split("~9~")[1].split("~6~")[0];
9
+
10
+ const result = {
11
+ content: bs.decode(postContent.replace(/_/g, '/').replace(/-/g, '+')).trim(),
12
+ likes: Number(likes),
13
+ age: age
14
+ }
15
+
16
+ return result;
17
+ }
18
+ }
@@ -6,18 +6,13 @@ module.exports = {
6
6
  let commentContent = comment.split("2~")[1].split("~3~")[0];
7
7
  let playerID = comment.split("~3~")[1].split("~4~")[0];
8
8
  let likes = comment.split("~4~")[1].split("~7~")[0];
9
- let isSpam = comment.split("~7~")[1].split("~10~")[0];
10
9
  let percent = comment.split("~10~")[1].split("~9~")[0];
11
10
  let age = comment.split("~9~")[1].split("~6~")[0];
12
11
  let messageID = comment.split("~6~")[1].split(":1~")[0];
13
12
  let username = comment.split(":1~")[1].split("~9~")[0];
14
13
 
15
14
  if(messageID.includes("~")) messageID = comment.split("~6~")[1].split("~11~")[0];
16
-
17
- let isSpamDecoding = {
18
- "0": false,
19
- "1": true
20
- }
15
+ if(playerID.includes("~")) playerID = comment.split("~3~")[1].split("~4~")[0].split("~")[0];
21
16
 
22
17
  const res = {
23
18
  username: username,
@@ -26,8 +21,7 @@ module.exports = {
26
21
  likes: Number(likes),
27
22
  percent: Number(percent),
28
23
  id: Number(messageID),
29
- age: age,
30
- isSpam: isSpamDecoding[isSpam]
24
+ age: age
31
25
  }
32
26
 
33
27
  return res;
@@ -0,0 +1,45 @@
1
+ module.exports = {
2
+ decodeGJGauntlet:
3
+ function(gauntlet) {
4
+ let gauntletID = gauntlet.split(":3:")[0].split("1:")[1]
5
+ if(gauntletID == "") gauntletID = "1";
6
+ let levelList = gauntlet.split(":3:")[1];
7
+ if(levelList.includes("#")) levelList = gauntlet.split(":3:")[1].split("#")[0];
8
+
9
+ if(levelList.includes(":")) levelList = gauntlet.split("3:")[2];
10
+
11
+ let firstLvl = levelList.split(",")[0];
12
+ let secondLvl = levelList.split(",")[1].split(",")[0];
13
+ let thirdLvl = levelList.split(",")[2].split(",")[0];
14
+ let fourthLvl = levelList.split(",")[3].split(",")[0];
15
+ let fifthLvl = levelList.split(",")[4].split(",")[0];
16
+
17
+ const gauntletIDs = {
18
+ "1": "Fire Gauntlet",
19
+ "2": "Ice Gauntlet",
20
+ "3": "Poison Gauntlet",
21
+ "4": "Shadow Gauntlet",
22
+ "5": "Lava Gauntlet",
23
+ "6": "Bonus Gauntlet",
24
+ "7": "Chaos Gauntlet",
25
+ "8": "Demon Gauntlet",
26
+ "9": "Time Gauntlet",
27
+ "10": "Crystal Gauntlet",
28
+ "11": "Magic Gauntlet",
29
+ "12": "spike Gauntlet",
30
+ "13": "Monster Gauntlet",
31
+ "14": "Doom Gauntlet",
32
+ "15": "Death Gauntlet",
33
+ undefined: "Poison Gauntlet"
34
+ }
35
+
36
+ const list = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl]
37
+
38
+ const result = {
39
+ "name": gauntletIDs[gauntletID],
40
+ "levels": list
41
+ }
42
+
43
+ return result;
44
+ }
45
+ }