Read Token from external sources
ergl opened this issue · comments
Seeing that a lot of people are forgetting to remove their access token from the code before pushing, I would recommend to add a way to read the Token from an external config file or environment variable, and then gitignore that config file
Yeah, I started writing that, but finished with other non-related task.
We could make it a library feature, a couple of methods to get a token. Bot programming would be more simple and flexible.
I was thinking that too - it could check for a token on startup and fail if no valid token was found - instead of waiting for the Telegram server to respond with an error
I think it would be better for error-checking to create separate functions "getFileToken()" getToken()"... things like that and call one of them from the main process.
That's why I created the connect() method
I suppose we can close this issue.
I suppose we can close this issue.
👍