fixes
This commit is contained in:
		
							
								
								
									
										2
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.py
									
									
									
									
									
								
							@@ -188,7 +188,7 @@ def _process_message(bot: Bot, m: Message):
 | 
				
			|||||||
            del conn.root.users[uid]
 | 
					            del conn.root.users[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'из-за блокировки бота')
 | 
					                                              f'из-за блокировки бота', parse_mode='html')
 | 
				
			||||||
        except TelegramError:
 | 
					        except TelegramError:
 | 
				
			||||||
            sentry_sdk.capture_exception()
 | 
					            sentry_sdk.capture_exception()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,8 +6,9 @@ from db import get_conn, Subscriber
 | 
				
			|||||||
from config import BOT_TOKEN, MANAGEMENT_CHAT
 | 
					from config import BOT_TOKEN, MANAGEMENT_CHAT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def send_users_list(bot: Bot = None):
 | 
					def send_users_list(bot: Bot = None, conn=None):
 | 
				
			||||||
    conn = get_conn(read_only=True)
 | 
					    if conn is None:
 | 
				
			||||||
 | 
					        conn = get_conn(read_only=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if not bot:
 | 
					    if not bot:
 | 
				
			||||||
        bot = Bot(BOT_TOKEN)
 | 
					        bot = Bot(BOT_TOKEN)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user