fix status in discord being to chatty.

This commit is contained in:
Madpeter 2023-12-01 09:51:14 +00:00
parent e5c6ced9b0
commit 866e25e537

View file

@ -31,7 +31,11 @@ namespace SecondBotEvents.Services
{ {
if (myConfig == null) if (myConfig == null)
{ {
return "Config broken"; return "No Config";
}
else if (myConfig.GetHideStatusOutput() == true)
{
return "hidden";
} }
else if(myConfig.GetEnabled() == false) else if(myConfig.GetEnabled() == false)
{ {
@ -827,14 +831,14 @@ namespace SecondBotEvents.Services
{ {
return; return;
} }
long dif = SecondbotHelpers.UnixTimeNow() - LastUpdatedSystemStatus;
if (dif < 15)
{
return;
}
ITextChannel statusChannel = GetChannel("status", StatusPrefill(), "bot"); ITextChannel statusChannel = GetChannel("status", StatusPrefill(), "bot");
if ((e.changed == false) && (LastStatusMessageId != 0)) if ((e.changed == false) && (LastStatusMessageId != 0))
{ {
long dif = SecondbotHelpers.UnixTimeNow() - LastUpdatedSystemStatus;
if (dif < 15)
{
return;
}
LastUpdatedSystemStatus = SecondbotHelpers.UnixTimeNow(); LastUpdatedSystemStatus = SecondbotHelpers.UnixTimeNow();
if (messageHasEndDot == false) if (messageHasEndDot == false)