zuka-chat-bot 1.5.2 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- package/Main.js +7 -0
- package/package.json +1 -1
package/Main.js
CHANGED
@@ -359,6 +359,13 @@ function buildAPI(globalOptions, html, jar, bypass_region) {
|
|
359
359
|
}
|
360
360
|
|
361
361
|
var defaultFuncs = utils.makeDefaults(html, userID, ctx);
|
362
|
+
api.postFormData = function(url, body) {
|
363
|
+
return defaultFuncs.postFormData(url, ctx.jar, body);
|
364
|
+
};
|
365
|
+
// Load all api functions in a loop
|
366
|
+
apiFuncNames.map(v => api[v] = require('./src/' + v)(defaultFuncs, api, ctx));
|
367
|
+
|
368
|
+
return [ctx, defaultFuncs, api];
|
362
369
|
|
363
370
|
fs.readdirSync(__dirname + "/src").filter((/** @type {string} */File) => File.endsWith(".js") && !File.includes('Dev_')).map((/** @type {string} */File) => {
|
364
371
|
if (File == 'getThreadInfo.js' && global.Fca.Require.FastConfig.AntiGetInfo.AntiGetThreadInfo != true || File == 'getUserInfo.js' && global.Fca.Require.FastConfig.AntiGetInfo.AntiGetUserInfo != true) api[File.split('.').slice(0, -1).join('.')] = require('./src/' + (File.includes('getThreadInfo') ? 'getThreadMain.js' : 'getUserInfoMain.js'))(defaultFuncs, api, ctx)
|