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

Changed User.chat_id to User.id in docstrings of User.send_* methods in user.py #1081

Merged
merged 4 commits into from Apr 25, 2018

Conversation

Projects
None yet
2 participants
@Tr-Jono
Copy link
Contributor

Tr-Jono commented Apr 23, 2018

Since the User.send_* methods' docstrings show that they are shortcuts for bot.send_*(User.chat_id, *args, **kwargs) methods in user.py, I replaced User.chat_id with User.id in the docstrings in these methods, because User does not have the attribute chat_id and I believe it has been confused as the attribute id.

The amended User.send_* methods include:
User.send_audio
User.send_document
User.send_message
User.send_photo
User.send_sticker
User.send_video
User.send_video_note
User.send_voice

Edit: Found similar mistakes in Chat.send_* methods in Chat.py so I added them to this PR.

Tr-Jono added some commits Apr 23, 2018

Changed all "User.chat_id"s to "User.id"
Users do not have chat ids.
Chat.chat_id --> Chat.id
Corrected docstrings.
Merge pull request #1 from Tr-Jono/patch-2
Chat.chat_id --> Chat.id
@tsnoam

tsnoam approved these changes Apr 25, 2018

@tsnoam tsnoam merged commit 78fee3c into python-telegram-bot:master Apr 25, 2018

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
Hound No violations found. Woof!
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tsnoam

This comment has been minimized.

Copy link
Member

tsnoam commented Apr 25, 2018

@Tr-Jono
Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.