Error when compiling Echo Bot example
snowcat404 opened this issue · comments
Code Used:
https://github.com/ba0f3/telebot.nim#echo-bot
Command Used:
nim c -d:ssl echo.nim
Output:
C:\Users\User\Desktop\Nim\echo.nim(140, 4) Error: type mismatch: got <TeleBot, proc (b: TeleBot, u: Update):
Future[system.bool]{.locks: <unknown>.}>
but expected one of:
proc onUpdate(b: TeleBot; cb: UpdateCallback)
first type mismatch at position: 2
required type for cb: UpdateCallback
but expression 'updateHandler' is of type: proc (b: TeleBot, u: Update): Future[system.bool]{.locks: <unknown>.}
Pragma mismatch: got '{..}', but expected '{.gcsafe.}'.
This expression is not GC-safe. Annotate the proc with {.gcsafe.} to get extended error information.
Did you solve this problem yourself?