load subject from files instead of hard coding them #1

Merged
mb merged 3 commits from :master into master 2024-05-04 13:45:58 +02:00
Showing only changes of commit ac2f47f431 - Show all commits

View file

@ -1,5 +1,7 @@
#!/bin/env -S deno run -A --unstable-kv #!/bin/env -S deno run -A --unstable-kv
import * as fs from "node:fs";
import { Client } from "npm:discord.js"; import { Client } from "npm:discord.js";
import { Storage } from "./lib/storage.ts"; import { Storage } from "./lib/storage.ts";
@ -10,20 +12,7 @@ import { declare_commands, handle_autocomplete, handle_command } from "./lib/com
const log = log_from(import.meta); const log = log_from(import.meta);
import * as fs from "node:fs"; const subjects = fs.readFileSync('/modules.conf', 'utf-8').split('\n');
const subjects = fs.readFileSync('/path-to-file', 'utf-8').split('\n');
/*
const subjects = new Set([
"Conception",
"Hardware",
"Infrastructure Cloud",
"Intelligence Artificielle",
"Robotique",
"Sécurité",
"SEPT",
"Sûreté",
]);*/
async function main() { async function main() {
const debug_server = Deno.env.get("DEBUG"); const debug_server = Deno.env.get("DEBUG");