Skip to content

Commit

Permalink
merge: #1623 from telegraf/experimental-actual-replies
Browse files Browse the repository at this point in the history
Ref: #1623
  • Loading branch information
MKRhere committed Aug 24, 2022
2 parents 883bd6d + d45e167 commit 4b52522
Show file tree
Hide file tree
Showing 9 changed files with 552 additions and 61 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Expand Up @@ -31,7 +31,8 @@
"/typings/",
"/docs/",
"/test/",
"/types.*"
"/types.*",
"/future.*"
],
"reportUnusedDisableDirectives": true,
"plugins": ["ava"]
Expand Down
1 change: 1 addition & 0 deletions future.d.ts
@@ -0,0 +1 @@
export * from './typings/future'
1 change: 1 addition & 0 deletions future.js
@@ -0,0 +1 @@
module.exports = require('./lib/future')
8 changes: 7 additions & 1 deletion package.json
Expand Up @@ -19,6 +19,11 @@
"require": "./lib/index.js",
"import": "./lib/index.js"
},
"./future": {
"types": "./future.d.ts",
"require": "./future.js",
"import": "./future.js"
},
"./types": {
"types": "./types.d.ts",
"require": "./types.js",
Expand All @@ -31,7 +36,8 @@
"lib/**/*.js",
"typings/**/*.d.ts",
"typings/**/*.d.ts.map",
"types.*"
"types.*",
"future.*"
],
"bin": {
"telegraf": "bin/telegraf.mjs"
Expand Down
2 changes: 2 additions & 0 deletions release-notes/4.9.0.md
Expand Up @@ -6,6 +6,8 @@
* Added method `Telegraf::createWebhook` which calls `setWebhook` first, and returns Promise of Express-style middleware. [[Example]](https://github.com/feathers-studio/telegraf-docs/blob/master/examples/webhook/express.ts)
* Updated Telegraf binary; it is now written in TS, and supports ESM modules and new command-line options `--method` and `--data` to call API methods from the command-line.
* Added experimental export of Telegraf's convenience types, such as the `Extra*` parameter types, now found as: `import type { Convenience } from "telegraf/types"`
* Added `Context::sendMessage` and `Context:sendWith*` methods mirroring `Context::reply` and `Context::replyWith*` methods respectively.
* Added new middleware: `import { useNewReplies } from telegraf/future` that changes the behaviour of `Context::reply*` methods to actually reply to the context message.
* (docs) New documentation effort started at [feathers-studio/telegraf-docs](https://github.com/feathers-studio/telegraf-docs).
* (docs) All doc examples were moved to new repo and updated to full TS and ESM.
* (internal) Removed `Telegraf::handleUpdates`.
Expand Down

0 comments on commit 4b52522

Please sign in to comment.