Token & environment variables
Store your Discord token safely via the panel environment variables.
Ready to start your service? Check offers and order online.
View offers and orderSecure your token
Do not store never your Discord token in plain language in the code or a public repository. Use the environment variables of the panel.
- Open the Variables / Startup tab of the panel
- Add a variable, e.g.
DISCORD_TOKENwith your token - Read it in the code via
process.env.DISCORD_TOKEN(Node) oros.environ(Python)
Example (Node.js)
In your code: client.login(process.env.DISCORD_TOKEN). No sensitive value appears in the files.
Regenerating in case of leakage
If your token has been exposed, re-generate it immediately on the Discord developer portal, then update the environment variable and restart.