From 92eb1c6bcec46541d5b93ed14619b008cfa50278 Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 2 Oct 2024 04:46:05 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D1=81=D0=BC=D0=B5=D0=BD=D0=B0=20=D1=81?= =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handlers/start.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/handlers/start.py b/handlers/start.py index 8888d894..d7c62f27 100644 --- a/handlers/start.py +++ b/handlers/start.py @@ -7,7 +7,7 @@ from aiogram.types import (BufferedInputFile, CallbackQuery, InlineKeyboardButton, InlineKeyboardMarkup, Message) from bot import bot -from config import (ADMIN_ID, CHANNEL_URL, # Добавьте SUPPORT_CHAT_URL +from config import (ADMIN_ID, CHANNEL_URL, SUPPORT_CHAT_URL) router = Router() @@ -18,9 +18,9 @@ class FeedbackState(StatesGroup): async def send_welcome_message(chat_id: int): # Новый текст приветствия welcome_text = ( - "*SoloNet — ваш провайдер в бесцензурный интернет!*\n\n" - "Получите высокую скорость и самый безопасный протокол VPN, " - "который работает даже в Китае." + "*SoloNet — ваш доступ в свободный интернет! 🌐✨*\n\n" + "Используйте надежный и быстрый VPN, который гарантирует вашу безопасность даже в самых строгих условиях. 🔒🚀\n\n" + "*ver. 1.0*" ) # Путь к изображению @@ -43,7 +43,7 @@ async def send_welcome_message(chat_id: int): with open(image_path, 'rb') as image_from_buffer: await bot.send_photo( chat_id, - BufferedInputFile(image_from_buffer.read(), filename="solo_pic.png"), + BufferedInputFile(image_from_buffer.read(), filename="pic.jpg"), caption=welcome_text, parse_mode='Markdown', reply_markup=inline_keyboard # Inline-клавиатура From 45ddf524eb2084b41a5ecf51f6119f639bbbadf3 Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 2 Oct 2024 04:51:48 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D1=81=D0=BC=D0=B5=D0=BD=D0=B0=20=D1=81?= =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handlers/start.py | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/start.py b/handlers/start.py index d7c62f27..1d87dabb 100644 --- a/handlers/start.py +++ b/handlers/start.py @@ -71,6 +71,7 @@ async def handle_about_vpn(callback_query: CallbackQuery): await callback_query.message.answer( info_message, + parse_mode='HTML', parse_mode='Markdown', reply_markup=inline_keyboard_back ) From f1b9f42f35c0326a75d39fe16bffd9fbe952f41e Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 2 Oct 2024 05:03:08 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D1=81=D0=BC=D0=B5=D0=BD=D0=B0=20=D1=81?= =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handlers/notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handlers/notifications.py b/handlers/notifications.py index ddf6e637..55b4210b 100644 --- a/handlers/notifications.py +++ b/handlers/notifications.py @@ -5,6 +5,7 @@ from aiogram import Bot, Router, types from aiogram.fsm.state import State, StatesGroup from aiogram.types import ( # Импортируем необходимые классы InlineKeyboardButton, InlineKeyboardMarkup) +from aiogram.filters import Command from bot import bot from config import DATABASE_URL, ADMIN_PASSWORD, ADMIN_USERNAME, ADMIN_ID @@ -89,7 +90,7 @@ async def notify_expiring_keys(bot: Bot): except Exception as e: print(f"Ошибка при отправке уведомлений: {e}") -@router.message(commands=['send_to_all']) +@router.message(Command('send_to_all')) async def send_message_to_all_clients(message: types.Message): # Проверяем, является ли отправитель администратором if message.from_user.id != ADMIN_ID: # Замените ADMIN_ID на ID вашего администратора