Skip to content

.delete() method doesn't work on business messages. #4866

@r0uted

Description

@r0uted

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

I would like to have a shortcut method to delete a business message.

await update.business_message.delete()

This doesn't work and raises message to be deleted not found error.

Describe the solution you'd like

Currently .delete() method doesn't support business_connection_id like other shortcut methods support it. (like .pin(), .unpin(), .reply_text(), .reply_photo() and other methods)

Describe alternatives you've considered

This can be working alternative to the issue.

await app.bot.delete_business_messages(
    business_connection_id=update.business_message.business_connection_id,
    message_ids=[update.business_message.id]
)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy