Skip to content

Commit

Permalink
FAQ: DropPendingUpdatesAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Aug 8, 2024
1 parent 9f2663c commit 68a879e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ You should specify all update types **including ChatMember** in `AllowedUpdates`

### _19. How to get rid of past updates when I restart my bot?_
Pass true into `StartReceiving`:`ReceiverOptions`:`DropPendingUpdates` or `SetWebhookAsync`:`dropPendingUpdates`
Alternatively, you can call `await bot.DropPendingUpdatesAsync()` before polling or using [`bot.OnUpdate`](3/updates/polling.md#by-setting-botonupdate-andor-botonmessage).

### _20. Difficulties to upload & send a file/media?_
- Make sure you `await` until the end of the send method before closing the file (a "`using`" clause would close the file on leaving the current { scope }
Expand Down

0 comments on commit 68a879e

Please sign in to comment.