From 85bd9b58615c10cf67a799cac5ea826179911f31 Mon Sep 17 00:00:00 2001 From: Akiru Date: Thu, 25 Jan 2024 08:51:39 +0000 Subject: [PATCH] bot/mod.ts aktualisiert --- bot/mod.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bot/mod.ts b/bot/mod.ts index 6f7fdda..527956a 100644 --- a/bot/mod.ts +++ b/bot/mod.ts @@ -13,6 +13,16 @@ import { pnginfoCommand, pnginfoQuestion } from "./pnginfoCommand.ts"; import { queueCommand } from "./queueCommand.ts"; import { txt2imgCommand, txt2imgQuestion } from "./txt2imgCommand.ts"; +// This section sets the configuration into the database. Limits the jobs per user and maximum jobs to safe defaults. +import { setConfig, getConfig } from "../app/config.ts"; + +// Set the new configuration +await setConfig({ maxUserJobs: 1, maxJobs: 500 }); + +// Log the updated configuration to the console, for debugging. +// const updatedConfig = await getConfig(); +// console.log("Updated Configuration:", updatedConfig); + interface SessionData { chat: ErisChatData; user: ErisUserData;