Skip to content

Commit 0b2a893

Browse files
authored
Update bot.gs
Update v1.1
1 parent 9778324 commit 0b2a893

1 file changed

Lines changed: 29 additions & 9 deletions

File tree

bot.gs

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Original source by JalanCoder (https://jalancoder.blogspot.com)
22
// Re-Code by Nanta (https://github.com/403Code)
3-
// Tool Version: 1.0.5
3+
// Tool Version: 1.1
44
// -------------------------
55
// Follow my Facebook
66
// EN: I'll use auto follow if you guys allow it :)
@@ -32,10 +32,22 @@
3232
// - Isi cookies facebook kamu.
3333

3434
var config = {
35-
cookie: "cookies here",
36-
type: 1,
35+
cookie:
36+
"<cookies here>",
37+
reactType: [1],
3738
};
3839

40+
// XXX
41+
// Don't change anything in here.
42+
var reactTable = {}
43+
reactTable[1] = "LIKE";
44+
reactTable[2] = "LOVE";
45+
reactTable[3] = "WOW";
46+
reactTable[4] = "HAHA";
47+
reactTable[7] = "SAD";
48+
reactTable[8] = "ANGRY";
49+
reactTable[16] = "CARE";
50+
3951
class Req {
4052
constructor(cookies = "") {
4153
this.prp = {
@@ -46,7 +58,7 @@ class Req {
4658
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) Gecko/20100101 Firefox/54.0",
4759
},
4860
};
49-
if (cookies) {
61+
if (cookies !== "") {
5062
this.prp.headers.cookie = cookies;
5163
}
5264
}
@@ -91,8 +103,13 @@ class Lib {
91103
var fetch = req.get("https://mbasic.facebook.com/home.php?sk=h_chr");
92104
return fetch.getContentText();
93105
}
106+
107+
random(a) {
108+
return a ? Math.floor(Math.random() * a.length) : null;
109+
}
94110
}
95111

112+
96113
function start() {
97114
const lib = new Lib();
98115

@@ -103,17 +120,20 @@ function start() {
103120
} catch {
104121
Logger.log("EN: Cookies invalid.\nID: Cookies kamu tidak valid.");
105122
}
106-
107123
for (x in c) {
108-
var d = lib.btwn(c[x], "ft_id=", "&");
124+
var d = lib.btwn(c[x], "ft_id=", "&"),
125+
tipe = config.reactType;
126+
var acak = lib.random(tipe);
109127
if (d != null && d !== "") {
128+
var reacts = tipe[acak];
110129
var e = req.get("https://mbasic.facebook.com/reactions/picker/?ft_id=" + d),
111130
f = e.getContentText().replace(/&amp;/g, "&");
112-
var g = lib.btwn(f, "/ufi/reaction/?ft_ent_identifier=" + d + "&reaction_type=" + config.type, '" style="display:block">');
113-
var h = req.get("https://m.facebook.com/ufi/reaction/?ft_ent_identifier=" + d + "&reaction_type=" + config.type + g);
131+
var g = lib.btwn(f, "/ufi/reaction/?ft_ent_identifier=" + d + "&reaction_type=" + reacts, '" style="display:block">');
132+
var h = req.get("https://m.facebook.com/ufi/reaction/?ft_ent_identifier=" + d + "&reaction_type=" + reacts + g);
114133
if (h.getResponseCode() == 302.0) {
115-
Logger.log(d + " -> OK");
134+
Logger.log(`--- React Success ---\nPost ID : ${d}\nReact : ${reactTable[reacts]}\n---------------------`);
116135
}
117136
}
118137
}
119138
}
139+
// XXX

0 commit comments

Comments
 (0)