github sanyok12345/teleproto v1.227.0

latest releases: v1.232.1, v1.232.0, v1.230.1...
5 months ago

Changes

  • Updated the TL schema to layer 227
  • RPC errors are now strongly typed — every Telegram RPC error is generated as its own class from the official error database, so you can catch specific errors via instanceof (e.g. errors.SessionRevokedError, errors.AuthKeyUnregisteredError, errors.ChannelPrivateError). Unknown or newer errors fall back to the base class for their HTTP code (e.g. UnauthorizedError, FloodError), and error.errorMessage always carries the exact server string for string matching
  • Fixed a long-standing crash where start() on an unauthorized or revoked session threw TypeError: Cannot use 'in' operator to search for 'phoneNumber' in undefined instead of a real error — it now surfaces the actual auth error (an UnauthorizedError such as SessionRevokedError / AuthKeyUnregisteredError / UserDeactivatedError). Auth params to start() are now optional
  • Frozen-account errors are now mapped by their HTTP code; the previous FrozenError / FrozenMethodError / FrozenParticipantError remain as deprecated aliases, so existing catch code keeps working

Upgrade

  • Run: npm i teleproto@latest

Don't miss a new teleproto release

NewReleases is sending notifications on new releases.