Changes
- Layer 229
client.updates: a middleware pipeline next to the classic handlers viause,on,catch,watch- Update names come from the schema, so all 165 are autocompleted and typed as their exact class
client.updates.watch(chat, handler)keeps updates flowing for channels the account is not a member ofInlineKeyboardandReplyKeyboardbuild markup from a grid, by chaining, or both, and expose every field of their schema placeholder, persistent, colours, icons and the rest- Rich messages render the new button and document blocks
Breaking
- Layer 229 replaced 17 button constructors with
keyboardButtonandkeyboardInlineButton, each carrying atype:
if (button instanceof Api.KeyboardInlineButton
&& button.type instanceof Api.InlineButtonTypeCallback) handle(button.type.data);Button.*, MessageButton and the buttons: option are unchanged.
- Generated input unions are now
TypeXIninstead ofXIn, which collided with the constructor of the same name
Fixes
- Files stored on another datacenter are requested from that datacenter instead of migrating on every part
- Abort listeners no longer pile up on a caller's
AbortSignal - A flapping link backs off instead of reconnecting 20 times a second, and connection attempts follow a 1…64 second ladder
- Socket errors carry the stack of the failure, not of the module
- Quizzes with more than ten answers are accepted (#38)
singleUseandselectivereach the reply keyboard instead of overwritingresize- Six modules could not be imported on their own; the library has no runtime import cycles left
Upgrade
npm i teleproto@latest