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

Conversation

Projects
None yet
4 participants
@rahiel
Member

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

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Jul 11, 2016

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@MWeesenaar

MWeesenaar Jul 12, 2016

Collaborator

Looks good to me!
Tests run and are green.

Collaborator

MWeesenaar commented Jul 12, 2016

Looks good to me!
Tests run and are green.

@rahiel

This comment has been minimized.

Show comment
Hide comment
@rahiel

rahiel Jul 14, 2016

Member

MAX_MESSAGES_PER_SECOND_PER_CHAT = 1

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Jul 14, 2016

Member

@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.

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.

rahiel added some commits Jul 14, 2016

@rahiel rahiel merged commit ef334f2 into master Jul 14, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

rahiel added a commit that referenced this pull request Jul 14, 2016

@rahiel rahiel removed the pending reply label Jul 14, 2016

@rahiel rahiel deleted the constants branch Jul 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment