Anyone know how to use .env?(discord.py)
tristandasavage

I'm trying to hide my token in a .env file so people can't get my bot's token, and I don't know how to get my token variable from the file.
ENV:
TOKEN=da token(not telling u lol)
PYTHON:
token = os.getenv("TOKEN")

I have a feeling that my code is wrong, but I don't know what the right code is.

You are viewing a single comment. View All
Answered by AloegelhiPlaysR [earned 5 cycles]
View Answer
Coder100

It is already hidden. Only you can see it.