Compare commits
	
		
			2 Commits
		
	
	
		
			66187601bf
			...
			3c0d5b01b5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 3c0d5b01b5 | |||
| 71138985be | 
| 
						 | 
				
			
			@ -4,9 +4,10 @@ const config = {
 | 
			
		|||
   CHANNELS_ALLOW: ['123456789012345678', '123456789012345678'],
 | 
			
		||||
   MOD_ROLE: '123456789012345678',
 | 
			
		||||
   STAFF_ROLE: '123456789012345678',
 | 
			
		||||
   RESTART_ROLE: '123456789012345678'
 | 
			
		||||
   RESTART_ROLE: '123456789012345678',
 | 
			
		||||
   ALLOW_RESTART: false,
 | 
			
		||||
   PRESENCE_INTERVAL: 5
 | 
			
		||||
   PRESENCE_INTERVAL: 5,
 | 
			
		||||
   ONLINE_CHECK: false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = config;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
const ChildProcess = require('child_process');
 | 
			
		||||
const { Client, GatewayIntentBits, Partials, EmbedBuilder } = require('discord.js');
 | 
			
		||||
const Config = require('./config/config');
 | 
			
		||||
 | 
			
		||||
class Server {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -39,6 +40,7 @@ class Server {
 | 
			
		|||
 | 
			
		||||
    hostIsAlive() {
 | 
			
		||||
        if ( !this.active || (this.rconAddress == "") ) return false;
 | 
			
		||||
        if ( Config.ONLINE_CHECK == false ) return true;
 | 
			
		||||
        try {
 | 
			
		||||
            let res = ChildProcess.execSync('ping -c 1 -W 0.25 -q ' + this.rconAddress);
 | 
			
		||||
            return true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user