diff --git a/app/bot.py b/app/bot.py
index c7de980..3d37a7b 100644
--- a/app/bot.py
+++ b/app/bot.py
@@ -300,7 +300,9 @@ def remove_stan_quote(message):
@bot.message_handler(func=is_admin, commands=['stats'])
def send_stats(message: types.Message):
if len(message.text.split()) == 1:
- bot.send_message(message.chat.id, report.create_report_text(message.chat.id))
+ rep = report.create_report_text(message.chat.id)
+ if rep:
+ bot.send_message(message.chat.id, rep)
else:
bot.send_message(message.chat.id, report.create_report_text(message.text.split()[-1]))
diff --git a/app/report.py b/app/report.py
index 7aee0ee..6769e9b 100644
--- a/app/report.py
+++ b/app/report.py
@@ -4,6 +4,7 @@ from .config import DATA
def create_report_text(chat_id):
+ report = ''
top_users = ''
flooders = []
if os.path.exists(f'{DATA}{chat_id}.db'):
@@ -18,8 +19,9 @@ def create_report_text(chat_id):
user = flooder["User"]
name = f"{user.first_name} {user.last_name}" if user.last_name else user.first_name
top_users += f'\n {i + 1}. {name} ({flooder["Count"]})'
- report = f"Hello, World! 🌍\n"
+
if s['Banned'] or s['Deleted']:
+ report = f"Hello, World! 🌍\n"
report += f"""
Заблокировано ⛔
├ Пользователей: {s['Banned']}