build(dev): Remove dotenv, use process.loadEnvFile instead (#5223)

This commit is contained in:
Fleny
2026-07-26 05:46:14 +05:30
committed by GitHub
parent aa5dd155cf
commit 9afac8d291
4 changed files with 10 additions and 15 deletions
-1
View File
@@ -40,7 +40,6 @@
"c8": "^12.0.0",
"chai": "^6.2.2",
"chai-as-promised": "^8.0.2",
"dotenv": "^17.4.2",
"mocha": "^11.7.6",
"sinon": "^22.0.0",
"ts-node": "^10.9.2",
+5 -3
View File
@@ -1,6 +1,8 @@
import dotenv from 'dotenv';
dotenv.config({ path: '../../.env', quiet: true });
try {
process.loadEnvFile('../../.env');
} catch {
// ignore
}
export const token = process.env.DISCORD_TOKEN!;
if (!token) throw new Error('Token was not provided.');