Telegram bot #150

Merged
Sirherobrine23 merged 14 commits from Telegram_bot into main 2021-08-11 02:47:35 +00:00
14 changed files with 530 additions and 355 deletions
Showing only changes of commit 697b9e8b87 - Show all commits

View File

@ -244,7 +244,7 @@ function bds_get_config(){
JsonConfig.commands = false;
// JsonConfig.worldtype = config["level-type"];
} else if (GetPlatform() === "jsprismarine") throw "Platform not fully supported";
else throw new Error("Platform no exists, check config file")
else throw new Error("Platform no exists, check config file");
return JsonConfig;
}
function config_example(){

View File

@ -75,7 +75,7 @@ async function authorize() {
app.use(require("body-parser").urlencoded({ extended: true }));
app.use(require("express-rate-limit")({windowMs: 1 * 60 * 1000, max: 100}));
app.use(require("cors")());
const port = RandomPort()
const port = RandomPort();
ip_andress.internal_ip.forEach(ips => {
let { ipv4, ipv6 } = ips.Interna_IP;
console.log(`Open: http://${ipv4}:${port}/request`);

View File

@ -31,7 +31,7 @@ async function Uploadbackups(object = "Backup.zip", fileLocation = resolve(__dir
resolve(putObjectResponse);
} catch (error) {
console.log("Error ", error);
reject(error)
reject(error);
}
});
}

View File

@ -2,7 +2,7 @@ const express = require("express");
const app = express.Router();
const { GetKernel } = require("../../../lib/BdsSystemInfo");
const commandExist = require("../../../lib/commandExist");
const { GetPlatform, GetServerVersion, UpdatePlatform, bds_dir } = require("../../../lib/BdsSettings")
const { GetPlatform, GetServerVersion, UpdatePlatform, bds_dir } = require("../../../lib/BdsSettings");
const admzip = require("adm-zip");
const bds = require("../../../index");
const { token_verify } = require("../../check");