Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce constants module #342

Merged
merged 4 commits into from
Jul 14, 2016
Merged

introduce constants module #342

merged 4 commits into from
Jul 14, 2016

Conversation

rahiel
Copy link
Contributor

@rahiel rahiel commented Jul 9, 2016

A module with constants of the Telegram network. The constants are tested, so we'll now when Telegram will change them...

@jh0ker
Copy link
Member

jh0ker commented Jul 11, 2016

Further suggestions

Message limits:

  • MAX_MESSAGES_PER_SECOND = 30
  • MAX_MESSAGES_PER_SECOND_PER_CHAT = 1
  • MAX_MESSAGES_PER_MINUTE_PER_GROUP = 20

File sizes

  • MAX_FILESIZE_UPLOAD = 50000000 (50MB)
  • MAX_FILESIZE_DOWNLOAD = 20000000 (20MB)
  • There may be a special limit (size or length) for voice messages, I'll check that out

Others:

  • SUPPORTED_WEBHOOK_PORTS = [443, 80, 88, 8443]

Edit: Testing these could be difficult

@MWeesenaar
Copy link
Contributor

Looks good to me!
Tests run and are green.

@rahiel
Copy link
Contributor Author

rahiel commented Jul 14, 2016

MAX_MESSAGES_PER_SECOND_PER_CHAT = 1

From where was this? My bot can send me 30 messages per second.

@jh0ker
Copy link
Member

jh0ker commented Jul 14, 2016

@rahiel from the bot FAQ:

When sending messages inside a particular chat, avoid sending more than one message per second. We may allow short bursts that go over this limit, but eventually you'll begin receiving 429 errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants