ашч
This commit is contained in:
		
							
								
								
									
										13
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								main.py
									
									
									
									
									
								
							@@ -184,14 +184,11 @@ def _process_message(bot: Bot, m: Message):
 | 
				
			|||||||
            if r:
 | 
					            if r:
 | 
				
			||||||
                user.update_from_message(r)
 | 
					                user.update_from_message(r)
 | 
				
			||||||
        except Unauthorized:
 | 
					        except Unauthorized:
 | 
				
			||||||
            try:
 | 
					            name = conn.root.subscribers[uid].name
 | 
				
			||||||
                name = conn.root.subscribers[uid].name
 | 
					            del conn.root.subscribers[uid]
 | 
				
			||||||
                del conn.root.subscribers[uid]
 | 
					            commit()
 | 
				
			||||||
                commit()
 | 
					            bot.send_message(MANAGEMENT_CHAT, f'<a href="tg://user?id={uid}">{name}</a> был удален '
 | 
				
			||||||
                bot.send_message(MANAGEMENT_CHAT, f'<a href="tg://user?id={uid}">{name}</a> был удален '
 | 
					                                              f'из-за блокировки бота', parse_mode='html')
 | 
				
			||||||
                                                  f'из-за блокировки бота', parse_mode='html')
 | 
					 | 
				
			||||||
            except Exception:
 | 
					 | 
				
			||||||
                sentry_sdk.capture_exception()
 | 
					 | 
				
			||||||
        except TelegramError:
 | 
					        except TelegramError:
 | 
				
			||||||
            sentry_sdk.capture_exception()
 | 
					            sentry_sdk.capture_exception()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user