mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
build(dev): Remove dotenv, use process.loadEnvFile instead (#5223)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user