ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

Error compiling inline_query_with_input_message_content example #52

Closed keshon closed 3 years ago

keshon commented 3 years ago

Example examples/inline_query_with_input_message_content.nim cannot be compiled https://github.com/ba0f3/telebot.nim/blob/04091a4c8adb40635046b22c614df883becbb80b/examples/inline_query_with_input_message_content.nim#L26 throwing error for this line :

Error: type mismatch: got <TeleBot, proc (b: TeleBot, u: InlineQuery): Future[system.void]{.gcsafe, locks: <unknown>.}>
but expected one of:
proc onInlineQuery(b: TeleBot; cb: InlineQueryCallback)
  first type mismatch at position: 2
  required type for cb: InlineQueryCallback
  but expression 'inlineHandler' is of type: proc (b: TeleBot, u: InlineQuery): Future[system.void]{.gcsafe, locks: <unknown>.}

expression: onInlineQuery(bot, inlineHandler)
keshon commented 3 years ago

Thanks!