mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-31 07:57:38 +03:00 
			
		
		
		
	Bring back report_errors to the constructor
This commit is contained in:
		
							parent
							
								
									3b42bc9991
								
							
						
					
					
						commit
						1e3120b0b6
					
				|  | @ -1,3 +1,5 @@ | |||
| .. _api-status: | ||||
| 
 | ||||
| ========== | ||||
| API Status | ||||
| ========== | ||||
|  |  | |||
|  | @ -73,6 +73,7 @@ class TelegramBareClient: | |||
|                  update_workers=None, | ||||
|                  spawn_read_thread=False, | ||||
|                  timeout=timedelta(seconds=5), | ||||
|                  report_errors=True, | ||||
|                  device_model=None, | ||||
|                  system_version=None, | ||||
|                  app_version=None, | ||||
|  | @ -103,6 +104,7 @@ class TelegramBareClient: | |||
|                 DEFAULT_PORT | ||||
|             ) | ||||
| 
 | ||||
|         session.report_errors = report_errors | ||||
|         self.session = session | ||||
|         self.api_id = int(api_id) | ||||
|         self.api_hash = api_hash | ||||
|  |  | |||
|  | @ -146,8 +146,12 @@ class TelegramClient(TelegramBareClient): | |||
|             instantly, as soon as they arrive. Can still be disabled | ||||
|             if you want to run the library without any additional thread. | ||||
| 
 | ||||
|         report_errors (:obj:`bool`, optional): | ||||
|             Whether to report RPC errors or not. Defaults to ``True``, | ||||
|             see :ref:`api-status` for more information. | ||||
| 
 | ||||
|     Kwargs: | ||||
|         Some extra parameters are required when stabilishing the first | ||||
|         Some extra parameters are required when establishing the first | ||||
|         connection. These are are (along with their default values): | ||||
| 
 | ||||
|             .. code-block:: python | ||||
|  | @ -168,6 +172,7 @@ class TelegramClient(TelegramBareClient): | |||
|                  update_workers=None, | ||||
|                  timeout=timedelta(seconds=5), | ||||
|                  spawn_read_thread=True, | ||||
|                  report_errors=True, | ||||
|                  **kwargs): | ||||
|         super().__init__( | ||||
|             session, api_id, api_hash, | ||||
|  | @ -177,6 +182,7 @@ class TelegramClient(TelegramBareClient): | |||
|             update_workers=update_workers, | ||||
|             spawn_read_thread=spawn_read_thread, | ||||
|             timeout=timeout, | ||||
|             report_errors=report_errors, | ||||
|             **kwargs | ||||
|         ) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user