Skip to content

Commit

Permalink
doc: fix typo & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fulcanelly committed Nov 15, 2024
1 parent bd61ad9 commit d53d8ca
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ which would create needed models in your project folder
After that you'll have to apply migration migrate

```bash
yarn prisma migrate dev --name add_chat_toolkit_models
yarn prisma migrate dev --name add_chat_toolkit_models
```
### Adjust code to supply events to handler

Expand Down Expand Up @@ -165,14 +165,14 @@ expectAny :: (Message -> a) -> Effect a

for example
```ts
await expectAny(msg => {
if ('photo' in msg) {
return msg.photo[0]
}
if ('text' in msg) {
return msg.text
}
})
await expectAny(msg => {
if ('photo' in msg) {
return msg.photo[0]
}
if ('text' in msg) {
return msg.text
}
})
```


Expand Down Expand Up @@ -254,13 +254,17 @@ const bot = new Telegraf(process.env.TG_TOKEN)

/// ...

export const { setupCallbackHandler, createCallbackHandle }
= createRedisInlineKeyboardHandler({
export const {
setupCallbackHandler,
createCallbackHandle,
} = createRedisInlineKeyboardHandler({
redis,
projectName: 'mybot',
ivalidateIn: duration(1, 'day'),
})

// ...

setupCallbackHandler(bot)

```
Expand Down

0 comments on commit d53d8ca

Please sign in to comment.