Updated the message detection code so it'll give up straight away if the status is bad

This commit is contained in:
barelyprofessional
2025-12-09 23:21:52 -06:00
parent 91878d92b5
commit 5af2015d46

View File

@@ -112,9 +112,11 @@ public class LambchopCommand : ICommand
var lambChopDisplayMessage =
await botInstance.SendChatMessageAsync(ConvertLambchopFieldToString(tiles, hazards, true), true,
autoDeleteAfter: cleanupDelay);
while (lambChopDisplayMessage.Status != SentMessageTrackerStatus.ResponseReceived)
while (lambChopDisplayMessage.ChatMessageId == null)
{
await Task.Delay(50, ctx); // wait until first message is fully sent
if (lambChopDisplayMessage.Status is SentMessageTrackerStatus.Lost or SentMessageTrackerStatus.NotSending)
return;
}
for (int i = -1; i <= steps;) // main game loop, if/else "state machine"