Hi I'm using this library https://www.nuget.org/packages/WTelegramClient/3.2.3-dev.3 I built fully working Telegram bot, but for some reason it works only in debug mode in visual studio.
When I run the application in debug mode it allows me to input all the required fields: api_id, api_hash, phone_number, verification_code and the login is successful.
However when I try to run console application published to folder it throws FLOOD_WAIT_X error every time I enter phone number. I realised it only happens after phone_number input. It looks like something happen when telegram api is about to send verification code.
This is the part of the code that causes error: (https://i.stack.imgur.com/PdvI3.png) This is error: (https://i.stack.imgur.com/g9Fve.png)
I know this error means that I send too many requests, but I tried slowing down requests, different logging types, publishing app to railway.app. It always throws error in the same moment - when the telegram suppose to send me verification code. Just to remind it only happens when the app is published. In debug mode in VS everything works as intended!!!
- Different Logging Types
- Logging With Environmental Variables
- Deploying App to railway.app - same result
- Changing publish configuration
- Handling error