Fix missing names
This commit is contained in:
parent
c914bc1cb8
commit
5e85e7805e
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ while (true)
|
||||||
if (!responseJson.HasValue) throw new Exception($"Could not get bot {robot.GetProperty("name")} image");
|
if (!responseJson.HasValue) throw new Exception($"Could not get bot {robot.GetProperty("name")} image");
|
||||||
var imageBase64 = responseJson.Value.GetProperty("robotImageData").GetString()!;
|
var imageBase64 = responseJson.Value.GetProperty("robotImageData").GetString()!;
|
||||||
File.WriteAllBytes(Path.Combine(dirPath, "image.png"), Convert.FromBase64String(imageBase64));
|
File.WriteAllBytes(Path.Combine(dirPath, "image.png"), Convert.FromBase64String(imageBase64));
|
||||||
Console.WriteLine($"Saved {robot.GetProperty("name")}");
|
Console.WriteLine($"Saved {robot.GetProperty("name").GetString() ?? "<unnamed>"}");
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue