From ff6e132ab4daa70cd09775f251d5daf19722ba8a Mon Sep 17 00:00:00 2001 From: Yusur Princeps Date: Wed, 25 Feb 2026 12:06:46 +0100 Subject: [PATCH] 0.4.0.b3 remove initConfig --- package-lock.json | 4 ++-- package.json | 2 +- src/initConfig.ts | 13 ------------- src/main.ts | 2 +- src/register.ts | 6 ++++-- 5 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 src/initConfig.ts diff --git a/package-lock.json b/package-lock.json index a3b47f0..02c7c79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sknsybot", - "version": "0.4.0.b2", + "version": "0.4.0.b3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sknsybot", - "version": "0.4.0.b2", + "version": "0.4.0.b3", "license": "Apache-2.0", "dependencies": { "chalk": "^5.4.1", diff --git a/package.json b/package.json index d4b3749..e910f52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sknsybot", - "version": "0.4.0.b2", + "version": "0.4.0.b3", "private": true, "description": "", "license": "Apache-2.0", diff --git a/src/initConfig.ts b/src/initConfig.ts deleted file mode 100644 index 64d3565..0000000 --- a/src/initConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ - - -import { configDotenv } from 'dotenv'; -import process from 'node:process'; - -export default function init (){ - configDotenv(); - - if (!process.env.DATABASE_URL) { - throw new Error('DATABASE_URL not set. Cowardly refusing to start up'); - } -} - diff --git a/src/main.ts b/src/main.ts index 1fb4574..bd3abb4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import { configDotenv } from "dotenv"; -configDotenv(); // apparently init does not get executed +configDotenv(); const client = (await import("./bot")).default; diff --git a/src/register.ts b/src/register.ts index b69a5bd..10430c6 100644 --- a/src/register.ts +++ b/src/register.ts @@ -14,12 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import init from "./initConfig"; + +import { configDotenv } from "dotenv"; + +configDotenv(); import commandList from "./commandList"; import { REST, Routes } from 'discord.js'; -init(); function registerGlobal(rest: REST, clientId: string, commands: any){ rest.put(Routes.applicationCommands(clientId), { body: commands })