Prevent your API keys and Discord bot tokens from being stolen when using replit
Everyone can see your code created using replit.
It's really important that you don't set your API keys and other secret credentials directly in your code.
This isn't just for NovaAI, but for all your projects.
How to add new secrets
It's really simple:
- Click the lock icon in the left sidebar
-
Set
key
to something likeNOVA_API_KEY
orDISCORD_BOT_TOKEN
(don't use spaces etc.) and the fieldvalue
to your API key/token that you want to hide. - Click Add new secret
- Now, you'll need to change the code a bit. Don't worry, it's just one or two lines.