Backend + Telegram: изменена структура проекта, добавлен эндпоинт для регистрации на бэкенде

This commit is contained in:
2022-11-17 23:08:47 +03:00
parent 387506f766
commit 5c6e93fa4a
16 changed files with 302 additions and 16 deletions

20
telegram/textsouls/main.py Executable file
View File

@@ -0,0 +1,20 @@
import json
from aiogram import Bot, Dispatcher, executor
with open("telegram/config.json") as config_file:
config_data = json.load(config_file)
API_TOKEN = config_data["main_settings"]["BOT_TOKEN"]
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=["start", "help"])
async def send_welcome(message):
await message.reply("Nice!")
if __name__ == "__main__":
executor.start_polling(dp, skip_updates=True)