Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
fix: closes #3, #4
Browse files Browse the repository at this point in the history
  • Loading branch information
teidesu committed Feb 19, 2024
1 parent 45e1061 commit 0b69dfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion guide/dispatcher/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dp.onNewMessage(
)

dp.onError(async (error, update, state) => {
if (update.type === 'new_message') {
if (update.name === 'new_message') {
await update.data.replyText(`Error: ${error.message}`)

return true
Expand Down
2 changes: 1 addition & 1 deletion guide/topics/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To download a file, just use `downloadIterable`, `downloadStream`,
```ts
tg.on('new_message', async (msg) => {
if (msg.media?.type === 'photo') {
await tg.downloadToFile(msg.media)
await tg.downloadToFile('download.jpg', msg.media)
}
})
```
Expand Down

0 comments on commit 0b69dfe

Please sign in to comment.