Fix bug with checking empty Bio.

This commit is contained in:
Rykov7
2024-01-28 10:24:17 +03:00
parent 8067bb7f83
commit cc72f12470
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ from .constants import PYTHONCHATRU
from .report import create_report_text, reset_report_stats
if USE_REMINDER:
logging.debug("Starts reminder!!!")
logging.debug("[START] Reminder")
# We need synchronous instance of bot here as we use synchronous library 'schedule' in a separate thread.
bot = TeleBot(TOKEN, "HTML", disable_web_page_preview=True, allow_sending_without_reply=True)
else:
+1 -1
View File
@@ -98,7 +98,7 @@ async def check_new_members(message: types.Message):
info['bio'] = more_data.bio
if more_data.photo:
info['photo'] = more_data.photo.big_file_id
if has_links(info['bio']):
if info['bio'] and has_links(info['bio']):
await bot.ban_chat_member(message.chat.id, info['id'])
logging.info(f"[BANNED] User {info['full_name']} has url in bio: {info['bio']}")
else: