Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing shortcuts #2043

Merged
merged 4 commits into from
Aug 13, 2020
Merged

Add missing shortcuts #2043

merged 4 commits into from
Aug 13, 2020

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-Joshi Bibo-Joshi commented Aug 4, 2020

Turns out, there where a lot more than I expected.

Chat already has a method send_action. I added send_chat_action for completeness and both to User.
TL;DR: Both. Both is good.
I guess the logic was to skip the chat similarly to Message.edit_text as shortcut for Bot.edit_message_text, but the chat in send_chat_action acutally comes from the class name ChatAction … But having both doesn't hurt.

Also, one could think of adding shortcuts to ChosenInlineResult, which has an inline_message_id attribute, but IMHO that doesn't really make sense. It would only be needed, if one would edit the message right after it's posted (why, though?). In all other cases one usually has only the inline_message_id and not the CIR.

Closes #2034

@Bibo-Joshi Bibo-Joshi added this to the 13.0 milestone Aug 4, 2020
@Bibo-Joshi Bibo-Joshi marked this pull request as ready for review August 9, 2020 14:35
@Poolitzer
Copy link
Member

It would only be needed, if one would edit the message right after it's posted (why, though?)

Agree with that

Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good PR, I cant believe we missed .pin()

telegram/callbackquery.py Outdated Show resolved Hide resolved
telegram/chat.py Outdated Show resolved Hide resolved
telegram/message.py Show resolved Hide resolved
telegram/user.py Outdated Show resolved Hide resolved
Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks perfect now

@Bibo-Joshi Bibo-Joshi merged commit fc5844c into master Aug 13, 2020
@Bibo-Joshi Bibo-Joshi deleted the fix-2034 branch August 13, 2020 11:39
Bibo-Joshi added a commit that referenced this pull request Aug 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add missing shortcuts
3 participants