Skip to content

Commit

Permalink
docs(readme): improve stateless question example
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Jan 16, 2025
1 parent d0dc38f commit ccfc598
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,13 @@ async function externalEventOccured() {

Yes. It was moved into a separate library with version 5 as it made the source code overly complicated.

When you want to use it check [`grammy-stateless-question`](https://github.com/grammyjs/stateless-question).
When you want to use it check [`stateless-question`](https://github.com/grammyjs/stateless-question).

```ts
import { StatelessQuestion } from '@grammyjs/stateless-question';
import { getMenuOfPath } from 'grammy-inline-menu';

const myQuestion = new TelegrafStatelessQuestion<MyContext>(
const myQuestion = new StatelessQuestion<MyContext>(
'unique',
async (context, additionalState) => {
const answer = context.message.text;
Expand Down

0 comments on commit ccfc598

Please sign in to comment.