Skip to content

Integrating chat_data and user_data with respective Objects #1080

@JosXa

Description

@JosXa

Instead of passing them via pass_chat_data and pass_user_data explicitly, the user and chat data should be attached to the actual wrapper objects:
update.effective_user.data,
update.effective_chat.data

This should happen in the same fashion as many of the ptb objects get a bot injected.

As user_data and chat_data are only pass_ -able when they actually exist, I think this could be a good way of integrating everything a bit better by removing all the pass_* arguments.

This may happen either in preparation for #1026, or as a replacement for it (as the number of pass_* statements would sink). Also, it'd be consistent with Pyrogram.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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