env-file

Getting Discord Bot Token from Env File in Python

Getting Discord Bot Token from Env File in Python Question: I have a folder which has a few files: Procfile, requirements.txt, main.py and secret.env. Secret.env has one line of code in it: TOKEN = "my bot token" "My bot token" is my Discord token. Now, in main.py, I want to get access to this token …

Total answers: 1