Releases: grammyjs/stateless-question
v4.0.0
This release only changes things under the hood. The usage and functionality stays the same.
- perf(identifier): pregenerate formatting parts 1dbb743
- refactor(grammy): use grammy/types export over types package 2292b80
- build(node)!: use ES module 999ba3e
- build(node)!: require Node.js 14 00f11cf
BREAKING CHANGES: requires ES modules and Node.js >= 14
v3.0.1
v3.0.0
Migration from Telegraf to grammY
This plugin now only works with grammY. For Telegraf support continue to use the v2 version and consider switching to grammY.
These are the changes for migrating to v3 and grammY needed for this library:
-const TelegrafStatelessQuestion = require('telegraf-stateless-question');
+import {StatelessQuestion} from '@grammyjs/stateless-question';
-const unicornQuestion = new TelegrafStatelessQuestion('unicorns', ctx => {
+const unicornQuestion = new StatelessQuestion('unicorns', ctx => {
console.log('User thinks unicorns are doing:', ctx.message)
})
Significant commits
v3.0.0-beta.1
Migration from Telegraf to grammY
This plugin now only works with grammY. For Telegraf support continue to use the v2 version and consider switching to grammY.
These are the changes for migrating to v3 and grammY needed for this library:
-const TelegrafStatelessQuestion = require('telegraf-stateless-question');
+import {StatelessQuestion} from '@grammyjs/stateless-question';
-const unicornQuestion = new TelegrafStatelessQuestion('unicorns', ctx => {
+const unicornQuestion = new StatelessQuestion('unicorns', ctx => {
console.log('User thinks unicorns are doing:', ctx.message)
})
Significant commits
v2.0.1
v2.0.0
v1.0.0
- feat: Add pass through of an additional state. See Readme to additional state. The additional state is useful when working with the inline-menu. cbaa47f
- feat: MarkdownV2 is now supported bbce77e
- fix: correct the type of middleware() ca8528d
BREAKING CHANGE: with the additional state the url was slighly changed. Messages from before the update can not be answered. Messages created after the update work just fine. (Which is the case most of the times as question messages are newly created. Still its a breaking change.)
BREAKING CHANGE: the class properties messageSuffixMarkdown
(and for HTML / MarkdownV2) are now methods. This allows for the additional state if needed. bfd7575 14e0306