You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://telegram.me/PHP_Telegram_Bot_Support)
@@ -339,6 +339,52 @@ If you choose to / or are obliged to use the `getUpdates` method without a datab
339
339
$telegram->useGetUpdatesWithoutDatabase();
340
340
```
341
341
342
+
## Filter Update
343
+
344
+
:exclamation: Note that by default, Telegram will send any new update types that may be added in the future. This may cause commands that don't take this into account to break!
345
+
346
+
It is suggested that you specifically define which update types your bot can receive and handle correctly.
347
+
348
+
You can define which update types are sent to your bot by defining them when setting the [webhook](#webhook-installation) or passing an array of allowed types when using [getUpdates](#getupdates-installation).
349
+
350
+
```php
351
+
use Longman\TelegramBot\Entities\Update;
352
+
353
+
// For all update types currently implemented in this library:
354
+
// $allowed_updates = Update::getUpdateTypes();
355
+
356
+
// Define the list of allowed Update types manually:
0 commit comments