Skip to content

Commit

Permalink
Adding enviroment variables for another Docker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnoTalksDev committed Feb 21, 2022
1 parent d0d0e3e commit 048ddb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion extensions/dc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit 048ddb6

Please sign in to comment.