The bot will now set the GambaSesh presence detection flag if it receives a message in chat from GambaSesh while believing it isn't present. This should hopefully resolve issues where the bot author (since he shares accounts) leaves the channel while the bot is still present which trips the flag.

This commit is contained in:
barelyprofessional
2024-06-23 13:30:31 +08:00
parent 4aef087f3b
commit 004c078d54

View File

@@ -214,6 +214,11 @@ public class KickBot
foreach (var message in messages)
{
_logger.Info($"KF ({message.MessageDate.ToLocalTime():HH:mm:ss}) <{message.Author.Username}> {message.Message}");
if (_config.EnableGambaSeshDetect && !_initialStartCooldown && message.Author.Id == _config.GambaSeshUserId && !_gambaSeshPresent)
{
_logger.Info("Received a GambaSesh message after cooldown and while thinking he's not here. Setting the presence flag to avoid spamming chat");
_gambaSeshPresent = true;
}
if (!_seenMsgIds.Contains(message.MessageId) && !_initialStartCooldown)
{
if (message.MessageRaw.StartsWith("!time"))