From 607883ca995e8a9670f11d17b4ee5081cc4e9ad2 Mon Sep 17 00:00:00 2001 From: AndcoolSystems Date: Tue, 6 Feb 2024 15:13:39 +0300 Subject: [PATCH] fix Telegram dotenv --- Telegram_provider/.env | 1 + Telegram_provider/main.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Telegram_provider/.env diff --git a/Telegram_provider/.env b/Telegram_provider/.env new file mode 100644 index 0000000..6ebec57 --- /dev/null +++ b/Telegram_provider/.env @@ -0,0 +1 @@ +TOKEN=6423586916:AAG2Fi0Su0qoJIC9EZjX-UL23ZVU_WGZoJg \ No newline at end of file diff --git a/Telegram_provider/main.py b/Telegram_provider/main.py index 30cde84..d998cfe 100644 --- a/Telegram_provider/main.py +++ b/Telegram_provider/main.py @@ -10,13 +10,15 @@ from aiogram.methods import DeleteWebhook from prisma import Prisma import os +from dotenv import load_dotenv import time import asyncio import io import aiohttp """Создание всех нужных объектов""" -bot = Bot(token="6423586916:AAF9HVUbtsiuE7I1UKn9QfMkn82KM8NHKLU") +load_dotenv() +bot = Bot(token=os.getenv("TOKEN")) dp = Dispatcher() db = Prisma() version = "beta 0.0.1"