Make file_name and file_dir mutually exclusive

This commit is contained in:
Eric Blundell 2018-03-20 07:47:38 -05:00
parent 6bb004fc83
commit b9f623921d

View File

@ -2659,6 +2659,10 @@ class Client:
Raises:
:class:`pyrogram.Error`
"""
if file_name is not None and file_dir is not None:
ValueError('file_name and file_dir may not be specified together.')
if isinstance(message, (types.Message, types.Photo)):
done = Event()
path = [None]