Update Status.cs
minor tweaks to status display
This commit is contained in:
parent
3223191979
commit
2c6f37d358
1 changed files with 19 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue