Use proper fields for sendPhoto and sendDocument

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-11-12 13:05:32 +05:30
parent 993b7a78a9
commit 4b55b1575c
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -129,9 +129,9 @@ proc startHandler(b: Telebot, c: Command): Future[bool] {.gcsafe, async.} =
discard await b.sendMediaGroup($c.message.chat.id, media=inputmedia)
else:
if TempData[0].ftype == "photo":
discard await b.sendPhoto(c.message.chat.id, TempData[0].fileid, TempData[0].caption)
discard await b.sendPhoto(chatId=c.message.chat.id, photo=TempData[0].fileid, caption=TempData[0].caption)
elif TempData[0].ftype == "document":
discard await b.sendDocument(c.message.chat.id, TempData[0].fileid, TempData[0].caption)
discard await b.sendDocument(c.message.chat.id, TempData[0].fileid, caption=TempData[0].caption)
elif TempData[0].ftype == "video":
discard await b.sendVideo(c.message.chat.id, TempData[0].fileid, caption=TempData[0].caption)
elif TempData[0].ftype == "videoNote":