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

Message.reply_document does not take force_document, while Client.send_document does #493

Open
the-blank-x opened this issue Sep 22, 2020 · 3 comments

Comments

@the-blank-x
Copy link

@the-blank-x the-blank-x commented Sep 22, 2020

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere.
  • I have searched in the issue tracker for similar bug reports, including closed ones.
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version.

Description

Basically what the title says

Steps to Reproduce

Pass force_document to Message.reply_document

from pyrogram import Client

client = Client('account', api_id=XXXXX, api_hash='XXXXX').start()
message = client.send_message('me', 'test')
message.reply_document('path/to/file.jpg', force_document=True)

Traceback

Traceback (most recent call last):
  File "pyrogram-bug-report.py", line 5, in <module>
    message.reply_document('/home/blankie/pictures/trump.jpg', force_document=True)
  File "/home/blankie/.local/lib/python3.8/site-packages/pyrogram/sync.py", line 38, in async_to_sync_wrap
    coroutine = function(*args, **kwargs)
TypeError: reply_document() got an unexpected keyword argument 'force_document'
@iflare3g
Copy link

@iflare3g iflare3g commented Oct 3, 2020

What is the expected behaviour ? Do we should add the force_document to reply_document as well, don't we ?

@the-blank-x
Copy link
Author

@the-blank-x the-blank-x commented Oct 9, 2020

Yeah, sorry for not specifying and being late.

@iflare3g
Copy link

@iflare3g iflare3g commented Oct 10, 2020

No problem, if there's no PR already opened I will take a look at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.