ba0f3 / telebot.nim

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

Doesn't work with nim devel #60

Closed yglukhov closed 3 years ago

yglukhov commented 3 years ago

echo bot example from the readme doesn't work with nim devel (3bc625aff1664eb4206ae90d0a132c8f717e651d), because it seems procName is broken in async functions. Here's the log from the bot:

DEBUG, [11:05:40] Making request to https://api.telegram.org/bot<MY_TOKEN>/getMeIter_OOZOOZOnimbleZpkgsZtelebot4549O48O55Ztelebot_5418
DEBUG, [11:05:40] Unable to fetch my info 404 Not Found
Async traceback:
...

As seen from the log above the url ends with getMeIter_OOZOOZOnimbleZpkgsZtelebot4549O48O55Ztelebot_5418 instead of getMe.

ba0f3 commented 3 years ago

does your token has special character? like \n?

P/S: I see the issue, I will check it soon

yglukhov commented 3 years ago

That surely got us somewhere, but unfortunately it still crashes if you try chatting with it.

ba0f3 commented 3 years ago

Idk why but looks like something went wrong with httpclient, I will check it asap

ba0f3 commented 3 years ago

Looks like httpclient is missing content-length header for multipart dataform. Update: I found this on Nim issues https://github.com/nim-lang/Nim/issues/14794