PartMan7 / PartBotter

Successor to PartBot. Old repository: https://github.com/PartMan7/PartBot
MIT License
1 stars 0 forks source link

Add a Secrets git module #9

Closed PartMan7 closed 3 months ago

PartMan7 commented 6 months ago

Goal:

Eg:

// Secret algorithm
function fallback (board: Board): Record<string, number[]>;
Secrets.get('leaderboard_algorithm', fallback);

// Secret value
if (query.params.puzzleId === Secrets.get('puzzle_id', 'catastropika'));

as well as registering all commands under Secrets.getCommands();

PartMan7 commented 6 months ago
get<T>(label: string, fallback: T): T { ... }