nitreojs / puregram

powerful and modern telegram bot api sdk for node.js and typescript 😁
https://puregram.cool
Do What The F*ck You Want To Public License
172 stars 10 forks source link

when I call the telegram.updates.StartPolling() function I get an error #65

Closed Zajroid closed 2 years ago

Zajroid commented 2 years ago

The bug

A clear and concise description of what the bug is.

Steps to reproduce

Steps to reproduce the behavior:

  1. I take the current from dotenv insert it into Telegram.FromToken(proccess.env.TOKEN)
  2. when I call the telegram.updates.StartPolling() function I get an error: unable to fetch bot data from the start

Expected behavior

started bot

Screenshots

https://pastenow.ru/6024c955b2e8921638db5d9033d5219e

Environment

package version
puregram ^2.8.2
node 14.20.0
TypeScript not use
yarn or npm npm

Additional context

Add any other context about the problem here.

nitreojs commented 2 years ago

that's not actually a bug; in fact, that's a feature: puregram was not able to fetch getMe due to some error and thus failed the polling initialization. perhaps something is wrong with your connection with api.telegram.org? you may also enable debug (how? here) and see what exactly is going wrong

Zajroid commented 2 years ago

puregram:updates:startPolling fetching bot data... +0ms puregram:updates:startPolling unable to fetch bot info, perhaps no internet connection? +2ms

telegram requests work, here is a screenshot of how I try to use your library: https://pastenow.ru/6024c955b2e8921638db5d9033d5219e

nitreojs commented 2 years ago

puregram:updates:startPolling fetching bot data... +0ms puregram:updates:startPolling unable to fetch bot info, perhaps no internet connection? +2ms

telegram requests work, here is a screenshot of how I try to use your library: https://pastenow.ru/6024c955b2e8921638db5d9033d5219e

you may also enable debug (how? here) and see what exactly is going wrong

nitreojs commented 2 years ago

closing the issue since no response was given, assuming you fixed the problem. if you didn't, feel free to reopen the issue