Fix bug with checking empty Bio.
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ from .constants import PYTHONCHATRU
|
|||||||
from .report import create_report_text, reset_report_stats
|
from .report import create_report_text, reset_report_stats
|
||||||
|
|
||||||
if USE_REMINDER:
|
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.
|
# 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)
|
bot = TeleBot(TOKEN, "HTML", disable_web_page_preview=True, allow_sending_without_reply=True)
|
||||||
else:
|
else:
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ async def check_new_members(message: types.Message):
|
|||||||
info['bio'] = more_data.bio
|
info['bio'] = more_data.bio
|
||||||
if more_data.photo:
|
if more_data.photo:
|
||||||
info['photo'] = more_data.photo.big_file_id
|
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'])
|
await bot.ban_chat_member(message.chat.id, info['id'])
|
||||||
logging.info(f"[BANNED] User {info['full_name']} has url in bio: {info['bio']}")
|
logging.info(f"[BANNED] User {info['full_name']} has url in bio: {info['bio']}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user