We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Document
thumb
1 parent 2fd9f3f commit 7a63e9bCopy full SHA for 7a63e9b
telebot.nim
@@ -242,11 +242,12 @@ proc parseAudio(n: JsonNode): Audio =
242
243
proc parsePhotoSize(n: JsonNode): PhotoSize =
244
new(result)
245
- result.fileId = n["file_id"].str
246
- result.width = n["width"].num.int
247
- result.height = n["height"].num.int
248
- if not n["file_size"].isNil:
249
- result.fileSize = n["file_size"].num.int
+ if not n["file_id"].isNil:
+ result.fileId = n["file_id"].str
+ result.width = n["width"].num.int
+ result.height = n["height"].num.int
+ if not n["file_size"].isNil:
250
+ result.fileSize = n["file_size"].num.int
251
252
proc parsePhoto(n: JsonNode): seq[PhotoSize] =
253
result = @[]
0 commit comments