Skip to content

Commit

Permalink
feat: change config settings
Browse files Browse the repository at this point in the history
  • Loading branch information
progmatic-99 committed Mar 12, 2024
1 parent 23f915d commit 485aeb7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import os
from dotenv import dotenv_values

if os.environ.get("DEPLOYMENT") == "PROD":
bot_token = os.environ.get("ACCESS_TOKEN")
db_path = "/var/db/rashan.sqlite3"
else:
config = dotenv_values(".env")
bot_token = config["ACCESS_TOKEN"]
usernames = config["USERNAMES"]
config = dotenv_values(".env")
bot_token = config["ACCESS_TOKEN"]
deployment = config["DEPLOYMENT"] or None

db_path = "/var/db/rashan.sqlite3" if deployment else "./rashan.sqlite"

0 comments on commit 485aeb7

Please sign in to comment.