Secrets - Secret Files

In the dock there exists the not so secret, ‘Secrets’ tab. You can use this tab to create 'Secret’s (which are essentially special variables hidden from other users).

I propose being able to make entire files secret.

This would be beneficial to many users (and I believe it is something many users have asked for before). This may not necessarily fix any issues, however it would help developers protect their programs.

In addition, Secrets could be measured in terms of storage space, you could include normal secrets and secret files in this measurement. Based on this, depending on your plan, each user could be allocated a set amount of ‘Secret Storage’. You could also purchase more secret storage with cycles (as secret files would be very similar to private Repls, it enables you to keep content hidden, it’s just more specific and probably therefore more valuable :wink: ).


I know many people asked about this with how to hide their secrets.json file for different bots.

1 Like

(I’m all out of reactions, I’ve just come back from a week-long summer camp and been catching up on what I’ve missed.) That’s a perfect example of a scenario where secret files would be very beneficial to users, using a string to store an entire JSON file is inadequate and a not so great, hackish solution.


Yea but it gets the idea across. Even if its just a pre made file where you can choose the extension that would be great!

I also forgot its summer for you

if it must be a file for some library to work, do check in your library docs do see if it has an environment variable alternative, which many do because it makes CI, e.g. github actions easier. If not you could store the JSON in a BOT_CONFIG secret, then in code you would do something like

fs.writeFileSync("/dev/shm/secrets.json", process.env.BOT_CONFIG);
// or is your library even weirder and *needs* the config file to be in the current directory?
1 Like