Make the theme selectable

This commit is contained in:
MeowcaTheoRange 2025-02-14 04:58:52 +00:00
parent 6567ce2387
commit 6993e55738

View file

@ -111,15 +111,17 @@ async function getTodaysTheme() {
encoding: "utf-8"
});
// let themeFileName = "test.txt"
let i = 50
let themeFileName = lastTheme
if (process.argv[2]) {
themeFileName = process.argv[2]
} else {
let i = 50
while (themeFileName == lastTheme) {
themeFileName = randomItem(directory);
if (i < 0) break
i--
}
}
await writeFile(dir_project("last_theme.txt"), themeFileName, {
encoding: "utf-8"