Add compatibility wrappers for issue #50 missing methods#80
Open
notedavidrinaldi wants to merge 2 commits into
Open
Add compatibility wrappers for issue #50 missing methods#80notedavidrinaldi wants to merge 2 commits into
notedavidrinaldi wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implemented compatibility wrappers for several Bot API methods listed in issue #50 by mapping them to existing Hydrogram methods where behavior already existed.
This change is a compatibility layer to reduce breaking integration issues for code expecting Bot API method names that were missing from
Client.Implemented methods include:
closeforward_messagecopy_messagesdelete_messageget_chat_member_countget_chat_administratorsset_chat_administrator_custom_titleclose_general_forum_topicedit_general_forum_topicreopen_general_forum_topichide_general_forum_topicunhide_general_forum_topicunpin_all_forum_topic_messagesunpin_all_general_forum_topic_messagesset_message_reactionset_my_commandsget_my_commandsdelete_my_commandsset_user_emoji_statusAlso updated method mixins (
__init__), added a small AST-based presence test, and added a changelog fragment.Closes #50
Type of change
How Has This Been Tested?
Test A
python3 -m py_compileon all new/modified method files and test file.Test B
pytest -q tests/test_issue_50_missing_methods.py1 passed in 0.09sTest Configuration
Operating System: macOS (local)
Python Version: 3.10
Checklist