Fix incorrect webhook URL port in aiohttp examples
Description
Updated examples to use default port in webhook URL. Resolves issues such as this.
Describe your tests
Tested by deploying on Heroku with the above change. Webhook running fine.
Python version: 3.10.7
OS: Ubuntu 20.04
Checklist:
- [x] I added/edited example on new feature/change (if exists)
- [x] My changes won't break backward compatibility
- [x] I made changes both for sync and async
Why you decided that if you cannot deploy this example to Heroku (one of quite specific services) - the example is incorrect and should be updated?
If you want to have specific Heroku example - make one. Or add HEROKU define for ones who want to use it on Heroku...
@Badiboy Why would one need to specify a port in the webhook URL that is going to be used by Telegram API? The only port that needs to be specified is the port that the application is going to be listening to.
@Y-T-G Because you may have multiple bots or other services on one IP.
Those who need it will edit example under their needs;
@Badiboy @coder2020official Okay, how about I separate external and internal port in two different variables,, since the external port can only be 80, 443, 88 and 8443, while the internal port that webserver listens to can be anything?
since the external port can only be 80, 443, 88 and 8443
External prots can be absolutely any port. Where did you get it?
Ig he is talking about this thing.
Btw, this is not a MISTAKE. Anyone who does not need port - can edit example under their needs; Not on the official repo;
Where did you get it
@coder2020official You are right. Sorry, I forget that I manage channels with different hook URL, not port.
@Y-T-G you can use this for heroku:
int(os.environ.get('PORT', 5000))
@coder2020official It's not really clear from the examples that one could use a different internal port since there's no differentiation being done between the external and internal ports. A single define sets both the internal and external ports.
Other examples have it as well. No need to edit examples: examples show basic usage. For further needs, user should edit the example under his/her needs.
Enough, sorry.