diff --git a/extensions/dc.py b/extensions/dc.py index 1ac487e..2de7519 100644 --- a/extensions/dc.py +++ b/extensions/dc.py @@ -4,8 +4,10 @@ from discord.ui import Button, View from discord.ext.commands import MissingPermissions from dotenv import load_dotenv -load_dotenv("secrets\.env") #mongodb setup +try: + load_dotenv("secrets\.env") +except: pass mongo_password=os.getenv("MONGO_PASSWORD") cluster = motor.motor_asyncio.AsyncIOMotorClient("mongodb+srv://TechnoTalks:"+mongo_password+"@main.rpbbi.mongodb.net/discord?retryWrites=true&w=majority") db=cluster.discord diff --git a/main.py b/main.py index dca89cc..cb7a60f 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,9 @@ #setting color of bot color=0x6bf414 #getting token from env -load_dotenv("secrets\.env") +try: + load_dotenv("secrets\.env") +except: pass token = os.getenv("TOKEN") #starting quart for website app = Quart(__name__)