initial project version

This commit is contained in:
2025-07-08 15:06:51 +03:00
commit 321594c890
10 changed files with 304 additions and 0 deletions

0
src/modules/__init__.py Normal file
View File

16
src/modules/start.py Normal file
View File

@ -0,0 +1,16 @@
from telebot.async_telebot import AsyncTeleBot
import logging
from config import MESSAGE_FOR_START
logger = logging.getLogger(__name__) # Получаем логгер для текущего модуля
def register_handlers(bot: AsyncTeleBot): # Регистрирует все обработчики команд
@bot.message_handler(commands=['start']) # Обработчик команды /start
async def start_command(message):
try:
logger.info(f"Команда START ({message.from_user.id})")
await bot.send_message(message.chat.id, MESSAGE_FOR_START)
except Exception as e:
logger.error(f"Команда START ({message.from_user.id}) {str(e)}")