load subject from files instead of hard coding them #1
1 changed files with 3 additions and 14 deletions
17
src/bot.ts
17
src/bot.ts
|
@ -1,5 +1,7 @@
|
|||
#!/bin/env -S deno run -A --unstable-kv
|
||||
|
||||
import * as fs from "node:fs";
|
||||
|
||||
import { Client } from "npm:discord.js";
|
||||
|
||||
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);
|
||||
import * as fs from "node:fs";
|
||||
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é",
|
||||
]);*/
|
||||
const subjects = fs.readFileSync('/modules.conf', 'utf-8').split('\n');
|
||||
|
||||
async function main() {
|
||||
const debug_server = Deno.env.get("DEBUG");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue