init commit

This commit is contained in:
2025-08-12 21:02:23 +09:00
parent a64b348631
commit 29aca4e7e9
37 changed files with 1318 additions and 176 deletions

View File

@@ -0,0 +1,5 @@
import os
class Settings:
BOT_TOKEN = os.getenv("BOT_TOKEN", "")
DATABASE_URL = os.getenv("DATABASE_URL", "")
settings = Settings()

14
services/bot/app/main.py Normal file
View File

@@ -0,0 +1,14 @@
import asyncio
from telegram.ext import Application, CommandHandler
from app.core.config import settings
async def start(update, context):
await update.message.reply_text("Привет! Бот запущен.")
async def main():
app = Application.builder().token(settings.BOT_TOKEN).build()
app.add_handler(CommandHandler("start", start))
await app.initialize()
await app.start()
await app.updater.start_polling()
await app.updater.wait_until_closed()
if __name__ == "__main__":
asyncio.run(main())