Skip to content

Commit fcaa304

Browse files
committed
added pollAsync proc
1 parent d9f5621 commit fcaa304

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

telebot/api.nim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,5 +705,9 @@ proc loop(b: TeleBot, timeout = 50, offset, limit = 0) {.async.} =
705705
proc poll*(b: TeleBot, timeout = 50, offset, limit = 0, clean = false) =
706706
if clean:
707707
waitFor b.cleanUpdates()
708-
709708
waitFor loop(b, timeout, offset, limit)
709+
710+
proc pollAsync*(b: TeleBot, timeout = 50, offset, limit = 0, clean = false) {.async.} =
711+
if clean:
712+
await b.cleanUpdates()
713+
await loop(b, timeout, offset, limit)

0 commit comments

Comments
 (0)