Update Status.cs

minor tweaks to status display
This commit is contained in:
Madpeterz 2021-03-25 04:58:04 +00:00
parent 3223191979
commit 2c6f37d358

View file

@ -17,6 +17,7 @@ namespace BetterSecondBot.DiscordSupervisor
}
}
public string lastStatus = "";
public string GetStatus()
{
string reply = "";
@ -39,10 +40,26 @@ namespace BetterSecondBot.DiscordSupervisor
{
reply = " " + reply;
}
if(reply != lastStatus)
{
lastStatus = reply;
}
else
{
reply = "";
}
if(HasBasicBot() == true)
{
controler.Bot.LastStatusMessage = controler.Bot.GetStatus();
reply = controler.Bot.LastStatusMessage + reply;
string newreply = controler.Bot.GetStatus();
if(newreply != controler.Bot.LastStatusMessage)
{
controler.Bot.LastStatusMessage = newreply;
}
else
{
newreply = "";
}
reply = newreply + reply;
if (controler.Bot.KillMe == true)
{
if (controler.Bot.GetClient.Network.Connected == true)