1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 12:21:00 -05:00

Remove stuff that aren't supposed to be in production

This commit is contained in:
Toast 2023-10-08 08:09:30 +11:00
parent 602fe7a657
commit 3c8c0f3d76
2 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,6 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
try { try {
const hitDSS = await fetch(Server.ip+'/feed/dedicated-server-stats.json?code='+Server.code, sessionInit).then(r=>r.json() as Promise<FSData>); const hitDSS = await fetch(Server.ip+'/feed/dedicated-server-stats.json?code='+Server.code, sessionInit).then(r=>r.json() as Promise<FSData>);
const hitCSG = await fetch(Server.ip+'/feed/dedicated-server-savegame.html?code='+Server.code+'&file=careerSavegame', sessionInit).then(async r=>(new client.fxp.XMLParser({ignoreAttributes: false, transformAttributeName(attributeName){return attributeName.replaceAll('@_','')}}).parse(await r.text()) as any).careerSavegame as FSCareerSavegame); const hitCSG = await fetch(Server.ip+'/feed/dedicated-server-savegame.html?code='+Server.code+'&file=careerSavegame', sessionInit).then(async r=>(new client.fxp.XMLParser({ignoreAttributes: false, transformAttributeName(attributeName){return attributeName.replaceAll('@_','')}}).parse(await r.text()) as any).careerSavegame as FSCareerSavegame);
console.log(hitCSG.settings)
if (!hitDSS ?? !hitCSG){ if (!hitDSS ?? !hitCSG){
if (hitDSS && !hitDSS.slots) return Logger.forwardToConsole('log', 'MPModule', `DSS failed with unknown slots table for ${client.MPServerCache[ServerName].name}`); if (hitDSS && !hitDSS.slots) return Logger.forwardToConsole('log', 'MPModule', `DSS failed with unknown slots table for ${client.MPServerCache[ServerName].name}`);

View File

@ -5,11 +5,11 @@ export default class ConfigHelper {
let importconfig:Config; let importconfig:Config;
try { try {
importconfig = JSON.parse(readFileSync(configFile, 'utf8')); importconfig = JSON.parse(readFileSync(configFile, 'utf8'));
console.log(`Using development config :: ${importconfig.configName}`); console.log(`Loaded the config :: ${importconfig.configName}`);
} catch (e) { } catch (e) {
console.error(`Error loading config file "${configFile}": ${e}`); console.error(`Error loading config file "${configFile}": ${e}`);
process.exit(1); process.exit(1);
} }
return importconfig; return importconfig;
} }
} }