Handle stickers as well
Also move the deeplinks to elif Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
5dc6903291
commit
d1bbc59e27
1 changed files with 9 additions and 4 deletions
|
@ -39,14 +39,16 @@ proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} =
|
|||
for i in TempData:
|
||||
if i.ftype == "photo":
|
||||
discard await b.sendPhoto(response.chat.id, i.fileid, i.caption)
|
||||
if i.ftype == "document":
|
||||
elif i.ftype == "document":
|
||||
discard await b.sendDocument(response.chat.id, i.fileid, i.caption)
|
||||
if i.ftype == "video":
|
||||
elif i.ftype == "video":
|
||||
discard await b.sendVideo(response.chat.id, i.fileid, caption=i.caption)
|
||||
if i.ftype == "videonote":
|
||||
elif i.ftype == "videonote":
|
||||
discard await b.sendVideoNote(response.chat.id, i.fileid)
|
||||
if i.ftype == "animation":
|
||||
elif i.ftype == "animation":
|
||||
discard await b.sendAnimation(response.chat.id, i.fileid, caption=i.caption)
|
||||
elif i.ftype == "sticker":
|
||||
discard await b.sendSticker(response.chat.id, i.fileid)
|
||||
else:
|
||||
var fileid = ""
|
||||
var ftype = ""
|
||||
|
@ -68,6 +70,9 @@ proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} =
|
|||
elif response.photo.isSome:
|
||||
fileid = response.photo.get[0].fileId
|
||||
ftype = "photo"
|
||||
elif response.sticker.isSome:
|
||||
fileid = response.sticker.get.fileId
|
||||
ftype = "sticker"
|
||||
elif response.mediaGroupId.isSome:
|
||||
fileid = response.mediaGroupId.get
|
||||
|
||||
|
|
Loading…
Reference in a new issue