wait for chat message id plinko update (#28)

* Update cleanup delay settings for PlinkoCommand, use plinko delay instead of limbo

Update cleanup delay settings for PlinkoCommand, use plinko delay instead of limbo

* wait for chat message id update

wait for chat message id update
This commit is contained in:
alogindtractor
2026-01-07 15:13:16 -08:00
committed by GitHub
parent e0d388b2f0
commit bdc84f6476

View File

@@ -84,8 +84,16 @@ public class PlinkoCommand : ICommand
ballsNotInPlay.Add(new PlinkoBall());
}
//game starts here
int breakCounter = 0
var plinkoMessageID = await botInstance.SendChatMessageAsync(PlinkoBoardDisplay(ballsInPlay), true, autoDeleteAfter: cleanupDelay);
int breakCounter = 0;
while (plinkoMessageID.ChatMessageId == null && breakCounter < 1000) {
await Task.Delay(100);
breakCounter++;
}
if (breakCounter >= 999){
throw new Exception("game broke while waiting for chat message id");
}
breakCounter = 0;
while (ballsNotInPlay.Count > 0 || ballsInPlay.Count > 0)
{
breakCounter++;