Skip to content

Commit

Permalink
ajoute chemin correct de .env
Browse files Browse the repository at this point in the history
  • Loading branch information
Paullux committed Jan 4, 2024
1 parent dc1ff63 commit c4059fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
from dotenv import load_dotenv

# Charge les variables d'environnement du fichier .env
load_dotenv()
extDataDir = os.getcwd()
if getattr(sys, 'frozen', False):
extDataDir = sys._MEIPASS
load_dotenv(dotenv_path=os.path.join(extDataDir, '.env'))

def is_discord_running():
# Cette fonction vérifie si Discord est en cours d'exécution sur l'ordinateur
Expand Down

0 comments on commit c4059fe

Please sign in to comment.