Skip to content
Back to top
View this page

# BusinessMessagesDeletedHandler

class telegram.ext.BusinessMessagesDeletedHandler(callback, chat_id=None, username=None, block=True)

  Bases: `telegram.ext.BaseHandler`

  Handler class to handle `deleted Telegram Business messages`.

  Use In

  - `telegram.ext.Application.add_handler()`

  - `telegram.ext.Application.add_handlers()`

  - `telegram.ext.Application.remove_handler()`

  Available In

  - `telegram.ext.ConversationHandler.entry_points`

  - `telegram.ext.ConversationHandler.fallbacks`

  - `telegram.ext.ConversationHandler.states`

  Added in version 21.1.

  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)

    - chat_id (`int` | Collection[`int`], optional) – Filters requests to allow only those which are from the specified chat ID(s).

    - username (`str` | Collection[`str`], optional) – Filters requests to allow only those which are from the specified username(s).

    - block (`bool`, optional) –

      Determines whether the return value of the callback should be awaited before processing the next handler in `telegram.ext.Application.process_update()`. Defaults to `True`.

      See also

      Concurrency

  callback

    The callback function for this handler.

    Type:

      coroutine function

  block

    Determines whether the return value of the callback should be awaited before processing the next handler in `telegram.ext.Application.process_update()`.

    Type:

      `bool`

  check_update(update)

    Determines whether an update should be passed to this handler’s `callback`.

    Parameters:

      update (`telegram.Update` | `object`) – Incoming update.

    Returns:

      `bool`