Commit 54e1b097 authored by Neoony's avatar Neoony
Browse files

-Small fixes

parent f21854c9
...@@ -210,15 +210,20 @@ function RefreshSQL() ...@@ -210,15 +210,20 @@ function RefreshSQL()
} }
} }
if (playersinlobby > 0) if (playersinlobby > 1)
{ {
client.user.setStatus('available'); client.user.setStatus('available');
//client.user.setActivity(numberofallplayers + ' players'); //client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ game: { name: "with " + playersinlobby + " Players", type: "Playing", url: "https://empiresmod.com"}}); client.user.setPresence({ game: { name: "with " + playersinlobby + " players", type: "Playing", url: "https://empiresmod.com"}});
}
if (playersinlobby == 1)
{
client.user.setStatus('available');
//client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ game: { name: "with " + playersinlobby + " player", type: "Playing", url: "https://empiresmod.com"}});
} }
if (playersoutoflobby >= 8) if (playersoutoflobby >= 8)
{ {
...@@ -239,6 +244,12 @@ function RefreshSQL() ...@@ -239,6 +244,12 @@ function RefreshSQL()
client.user.setStatus('idle'); client.user.setStatus('idle');
} }
if (playersinlobby == 0 && numberofallplayers != 0)
{
client.user.setPresence({ game: { name: "Waiting for players", type: "Playing", url: "https://empiresmod.com"}});
client.user.setStatus('idle');
}
//messageServerOn += namex[i] + " (" + playersx[i] + "/" + maxplayersx[i] + ")" + "\n" + addrx[i] + "\n"; //messageServerOn += namex[i] + " (" + playersx[i] + "/" + maxplayersx[i] + ")" + "\n" + addrx[i] + "\n";
//console.log('Returned value on message: ', messageServerOn); //console.log('Returned value on message: ', messageServerOn);
//client.user.setStatus('available') //client.user.setStatus('available')
......
{ {
"name": "EmpiresLobby", "name": "EmpiresLobbyDiscord",
"version": "0.0.1", "version": "0.0.1",
"description": "Empires Lobby Discord Bot", "description": "Empires Lobby Discord Bot",
"main": "EmpiresLobby.js", "main": "EmpiresLobby.js",
......
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