mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-30 23:47:33 +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 | API Status | ||||||
| ========== | ========== | ||||||
|  |  | ||||||
|  | @ -73,6 +73,7 @@ class TelegramBareClient: | ||||||
|                  update_workers=None, |                  update_workers=None, | ||||||
|                  spawn_read_thread=False, |                  spawn_read_thread=False, | ||||||
|                  timeout=timedelta(seconds=5), |                  timeout=timedelta(seconds=5), | ||||||
|  |                  report_errors=True, | ||||||
|                  device_model=None, |                  device_model=None, | ||||||
|                  system_version=None, |                  system_version=None, | ||||||
|                  app_version=None, |                  app_version=None, | ||||||
|  | @ -103,6 +104,7 @@ class TelegramBareClient: | ||||||
|                 DEFAULT_PORT |                 DEFAULT_PORT | ||||||
|             ) |             ) | ||||||
| 
 | 
 | ||||||
|  |         session.report_errors = report_errors | ||||||
|         self.session = session |         self.session = session | ||||||
|         self.api_id = int(api_id) |         self.api_id = int(api_id) | ||||||
|         self.api_hash = api_hash |         self.api_hash = api_hash | ||||||
|  |  | ||||||
|  | @ -146,8 +146,12 @@ class TelegramClient(TelegramBareClient): | ||||||
|             instantly, as soon as they arrive. Can still be disabled |             instantly, as soon as they arrive. Can still be disabled | ||||||
|             if you want to run the library without any additional thread. |             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: |     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): |         connection. These are are (along with their default values): | ||||||
| 
 | 
 | ||||||
|             .. code-block:: python |             .. code-block:: python | ||||||
|  | @ -168,6 +172,7 @@ class TelegramClient(TelegramBareClient): | ||||||
|                  update_workers=None, |                  update_workers=None, | ||||||
|                  timeout=timedelta(seconds=5), |                  timeout=timedelta(seconds=5), | ||||||
|                  spawn_read_thread=True, |                  spawn_read_thread=True, | ||||||
|  |                  report_errors=True, | ||||||
|                  **kwargs): |                  **kwargs): | ||||||
|         super().__init__( |         super().__init__( | ||||||
|             session, api_id, api_hash, |             session, api_id, api_hash, | ||||||
|  | @ -177,6 +182,7 @@ class TelegramClient(TelegramBareClient): | ||||||
|             update_workers=update_workers, |             update_workers=update_workers, | ||||||
|             spawn_read_thread=spawn_read_thread, |             spawn_read_thread=spawn_read_thread, | ||||||
|             timeout=timeout, |             timeout=timeout, | ||||||
|  |             report_errors=report_errors, | ||||||
|             **kwargs |             **kwargs | ||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user