File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1- version = " 0.5.7.3 "
1+ version = " 0.5.7.4 "
22author = " Huy Doan"
33description = " Async Telegram Bot API Client"
44license = " MIT"
Original file line number Diff line number Diff line change 591591 secret* : string
592592
593593 PassportData * = object of TelegramObject
594- data: seq [EncryptedPassportElement ]
595- credentials: EncryptedCredentials
594+ data* : seq [EncryptedPassportElement ]
595+ credentials* : EncryptedCredentials
596596
597597 PassportElementError = ref object of TelegramObject
598598 source* : string
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ proc getCommands*(update: Update): StringTableRef =
2727 var entities = message.entities.get ()
2828 for entity in entities:
2929 if entity.kind == " bot_command" :
30- var
30+ var
3131 messageText = message.text.get ()
3232 offset = entity.offset
3333 length = entity.length
@@ -236,13 +236,14 @@ macro genInputMedia*(mediaType: untyped): untyped =
236236
237237 result = quote do :
238238 proc `funcName` * (media: string ; caption= " " ; parseMode= " " ): `objName` =
239- new (result )
240- result .kind = `kind`
241- result .media = media
239+ var inputMedia = new (`objName` )
240+ inputMedia .kind = `kind`
241+ inputMedia .media = media
242242 if caption.len > 0 :
243- result .caption = some (caption)
243+ inputMedia .caption = some (caption)
244244 if parseMode.len > 0 :
245- result .parseMode = some (parseMode)
245+ inputMedia.parseMode = some (parseMode)
246+ return inputMedia
246247
247248macro magic * (head, body: untyped ): untyped =
248249 result = newStmtList ()
You can’t perform that action at this time.
0 commit comments