logout killme fixs

This commit is contained in:
Madpeterz 2021-02-14 18:57:06 +00:00
parent ce0ec34da8
commit e7a294e32f
2 changed files with 8 additions and 10 deletions

View file

@ -47,16 +47,8 @@ namespace BetterSecondBot.DiscordSupervisor
{ {
controler.Bot.GetClient.Network.Logout(); controler.Bot.GetClient.Network.Logout();
controler = null; controler = null;
if (DiscordClientConnected == true) reply = "[Discord-V: connected] (Logging out)";
{
reply = "[Discord-V: connected] (Logging out)";
}
else
{
reply = "[Discord-V: Disconnected] (Logging out)";
}
} }
} }
return reply; return reply;
} }

View file

@ -49,7 +49,13 @@ namespace BetterSecondBot.DiscordSupervisor
{ {
if (controler.Bot != null) if (controler.Bot != null)
{ {
return true; if (controler.Bot.GetClient != null)
{
if (controler.Bot.GetClient.Network != null)
{
return true;
}
}
} }
} }
return false; return false;