mirror of
https://github.com/Expand-sys/mcbot
synced 2025-12-17 07:12:13 +11:00
beep boop
This commit is contained in:
parent
4bdec181ab
commit
19e4b481fa
1 changed files with 7 additions and 3 deletions
|
|
@ -36,11 +36,15 @@ module.exports = {
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log("Server is offline" + error);
|
console.log("Server is offline" + error);
|
||||||
serverofflinefor += 10
|
serverofflinefor += 10
|
||||||
channelSend(`Server offline for ~${serverofflinefor}`)
|
if(serverofflinefor <= 60){
|
||||||
if(serverofflinefor > 60 && restarted != 1){
|
channelSend(`Server offline for ~${serverofflinefor}`)
|
||||||
|
}
|
||||||
|
if(serverofflinefor == 60 && restarted != 1){
|
||||||
channelSend(`server Offline for 60 seconds Restarting`)
|
channelSend(`server Offline for 60 seconds Restarting`)
|
||||||
const killer = spawn("screen", ['-XS', 'minecraft'])
|
const killer = spawn("screen", ['-XS', 'minecraft'])
|
||||||
const mc = spawn("screen", ['-dmS', 'minecraft', '/bin/bash', `${process.env.SERSTARTLOC}`])
|
const mc = spawn("screen", ['-dmS', 'minecraft', '/bin/bash', `${process.env.SERSTARTLOC}`], {
|
||||||
|
cwd: `${process.env.SERSTARTLOC}`
|
||||||
|
})
|
||||||
restarted = 1
|
restarted = 1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue