From b9f623921dead51872a424d6d251cdb89b13e8ad Mon Sep 17 00:00:00 2001 From: Eric Blundell Date: Tue, 20 Mar 2018 07:47:38 -0500 Subject: [PATCH] Make file_name and file_dir mutually exclusive --- pyrogram/client/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 89b256c5..4862b9e8 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -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]