-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbroadcast.js
40 lines (39 loc) · 1.39 KB
/
broadcast.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
38
39
40
'use strict';
switch (global.Fca.Require.FastConfig.BroadCast) {
case true: {
try {
var logger = global.Fca.Require.logger;
var Fetch = global.Fca.Require.Fetch;
Fetch.get("https://raw.githubusercontent.com/ivancotacte/Global_fca-project-orion/main/Fca_BroadCast.json").then(async (/** @type {{ body: { toString: () => string; }; }} */ res) => {
global.Fca.Data.BroadCast = JSON.parse(res.body.toString())
var random = JSON.parse(res.body.toString())[Math.floor(Math.random() * JSON.parse(res.body.toString()).length)] || "Ae Zui Zẻ Nhé !";
logger.Normal(random);
});
}
catch (e) {
console.log(e);
}
return setInterval(() => {
try {
try {
var logger = global.Fca.Require.logger;
var random = global.Fca.Data.BroadCast[Math.floor(Math.random() * global.Fca.Data.BroadCast.length)] || "Ae Zui Zẻ Nhé !";
logger.Normal(random);
}
catch (e) {
console.log(e);
return;
}
}
catch (e) {
console.log(e);
}
},3600 * 1000);
}
case false: {
break;
}
default: {
break;
}
}