feat: мини-истории, слово дня, меню практики
- Добавлены мини-истории для чтения с выбором жанра и вопросами - Кнопка показа/скрытия перевода истории - Количество вопросов берётся из настроек пользователя - Слово дня генерируется глобально в 00:00 UTC - Кнопка "Практика" открывает меню выбора режима - Убран автоматический create_all при запуске (только миграции) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
18
main.py
18
main.py
@@ -7,8 +7,7 @@ from aiogram.enums import ParseMode
|
||||
from aiogram.types import BotCommand
|
||||
|
||||
from config.settings import settings
|
||||
from bot.handlers import start, vocabulary, tasks, settings as settings_handler, words, import_text, practice, reminder, level_test, admin
|
||||
from database.db import init_db
|
||||
from bot.handlers import start, vocabulary, tasks, settings as settings_handler, words, import_text, practice, reminder, level_test, admin, exercises, wordofday, stories
|
||||
from services.reminder_service import init_reminder_service
|
||||
|
||||
|
||||
@@ -30,15 +29,14 @@ async def main():
|
||||
# Команды бота для меню Telegram
|
||||
await bot.set_my_commands([
|
||||
BotCommand(command="start", description="Запустить бота"),
|
||||
BotCommand(command="add", description="Добавить слово"),
|
||||
BotCommand(command="words", description="Тематическая подборка слов"),
|
||||
BotCommand(command="import", description="Импорт слов из текста"),
|
||||
BotCommand(command="vocabulary", description="Мой словарь"),
|
||||
BotCommand(command="task", description="Задания"),
|
||||
BotCommand(command="practice", description="Диалог с AI"),
|
||||
BotCommand(command="story", description="Мини-истории"),
|
||||
BotCommand(command="add", description="Добавить слово"),
|
||||
BotCommand(command="words", description="Тематическая подборка слов"),
|
||||
BotCommand(command="vocabulary", description="Мой словарь"),
|
||||
BotCommand(command="stats", description="Статистика"),
|
||||
BotCommand(command="settings", description="Настройки"),
|
||||
BotCommand(command="reminder", description="Напоминания"),
|
||||
BotCommand(command="help", description="Справка"),
|
||||
])
|
||||
|
||||
@@ -51,11 +49,13 @@ async def main():
|
||||
dp.include_router(words.router)
|
||||
dp.include_router(import_text.router)
|
||||
dp.include_router(practice.router)
|
||||
dp.include_router(exercises.router)
|
||||
dp.include_router(wordofday.router)
|
||||
dp.include_router(stories.router)
|
||||
dp.include_router(reminder.router)
|
||||
dp.include_router(admin.router)
|
||||
|
||||
# Инициализация базы данных
|
||||
await init_db()
|
||||
# База данных инициализируется через Alembic миграции (make local-migrate)
|
||||
|
||||
# Инициализация и запуск сервиса напоминаний
|
||||
reminder_service = init_reminder_service(bot)
|
||||
|
||||
Reference in New Issue
Block a user