Telegram bot commands #6

Merged
Sirherobrine23 merged 4 commits from Telegram_Bot_Commands into main 2021-01-08 23:29:54 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 323f05a70d - Show all commits

View File

@ -4,7 +4,7 @@ const cpuCount = require('os').cpus().length;
var fs = require("fs")
if (2 < cpuCount - 2) var CPU = cpuCount - 2; else var CPU = cpuCount;
if (json_config.includes('.json')){
var config = JSON.parse(fs.readFileSync(json_config, 'utf-8'))
var config = JSON.parse(fs.readFileSync(json_config, 'utf8'))
} else
var config = JSON.parse(json_config)
// const config = json_storage/*JSON.parse(json_storage)*/
@ -139,7 +139,7 @@ function bds_get_config(){
var fs = require("fs");
const propertiesToJSON = require("properties-to-json");
const Server_Config = `${require("../index").server_dir}/server.properties`;
const inGET = fs.readFileSync(Server_Config, "utf-8").replaceAll('-','_');
const inGET = fs.readFileSync(Server_Config, "utf8").replaceAll('-','_');
return propertiesToJSON(inGET);
};
module.exports.config_example = () =>{

View File

@ -9,7 +9,8 @@ Commands:
/server_stop
/server_restart
/log
/command: Commands are not working in this version, wait until it is broken
/command
/list
The messages are re-transmitted to the minecraft chat if it is already connected: ✔
Message Control: ❌`
ctx.reply(amenssagem)