mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Updated the message detection code so it'll give up straight away if the status is bad
This commit is contained in:
@@ -112,9 +112,11 @@ public class LambchopCommand : ICommand
|
|||||||
var lambChopDisplayMessage =
|
var lambChopDisplayMessage =
|
||||||
await botInstance.SendChatMessageAsync(ConvertLambchopFieldToString(tiles, hazards, true), true,
|
await botInstance.SendChatMessageAsync(ConvertLambchopFieldToString(tiles, hazards, true), true,
|
||||||
autoDeleteAfter: cleanupDelay);
|
autoDeleteAfter: cleanupDelay);
|
||||||
while (lambChopDisplayMessage.Status != SentMessageTrackerStatus.ResponseReceived)
|
while (lambChopDisplayMessage.ChatMessageId == null)
|
||||||
{
|
{
|
||||||
await Task.Delay(50, ctx); // wait until first message is fully sent
|
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"
|
for (int i = -1; i <= steps;) // main game loop, if/else "state machine"
|
||||||
|
|||||||
Reference in New Issue
Block a user