Commit 538186ee authored by Neoony's avatar Neoony
Browse files

Added a message "DM me !srv for ServerInfo" which will show in bots status...

Added a message "DM me !srv for ServerInfo" which will show in bots status every once in a while for 5 seconds
parent 218a322e
......@@ -31,6 +31,8 @@ var xpx = ["", "", "", "", "", "", "", "", "", ""];
var xpmessage = ["", "", "", "", "", "", "", "", "", ""];
var numberofservers;
var InfoDisplayCounter = 0;
var HandleDisconnectOn = 0;
//var messagex;
......@@ -313,6 +315,7 @@ function RefreshSQL()
client.user.setPresence({ game: { name: "Game On!" + " @" + namex[HighestPopServer], type: "Playing", url: "https://empiresmod.com"}});
}
}
setTimeout(MessageMe, 5000);
//messageServerOn += namex[i] + " (" + playersx[i] + "/" + maxplayersx[i] + ")" + "\n" + addrx[i] + "\n";
//console.log('Returned value on message: ', messageServerOn);
......@@ -322,6 +325,21 @@ function RefreshSQL()
});
};
function MessageMe()
{
//client.user.setActivity(numberofallplayers + ' players');
if (InfoDisplayCounter > 2)
{
client.user.setPresence({ game: { name: "DM me !srv for ServerInfo", type: "Playing", url: "https://empiresmod.com"}});
InfoDisplayCounter = 0;
}
if (InfoDisplayCounter <= 2)
{
InfoDisplayCounter = InfoDisplayCounter + 1;
}
console.log('InfoDisplayCounter: ' + InfoDisplayCounter);
}
function handleDisconnect() {
HandleDisconnectOn = 1;
connection = mysql.createConnection(db_config); // Recreate the connection, since
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment