ManagedBotUpdatedHandler¶
- class telegram.ext.ManagedBotUpdatedHandler(callback, user_id=None, username=None, block=True)[source]¶
Bases:
telegram.ext.BaseHandlerHandler class to handle
updated Telegram Managed Bots.Use In
Available In
Added in version 22.8.
- Parameters:
callback (coroutine function) –
The callback function for this handler. Will be called when
check_update()has determined that an update should be processed by this handler. Callback signature:async def callback(update: Update, context: CallbackContext)
user_id (
int| Collection[int], optional) – Filters requests to allow only those which are from the specified user ID(s). The user ID(s) can be either the creator of the managed bot or the bot itself.username (
str| Collection[str], optional) – Filters requests to allow only those which are from the specified username(s). The username(s) can be either the creator of the managed bot or the bot itself.Determines whether the return value of the callback should be awaited before processing the next handler in
telegram.ext.Application.process_update(). Defaults toTrue.See also
- block[source]¶
Determines whether the return value of the callback should be awaited before processing the next handler in
telegram.ext.Application.process_update().- Type: