imported env files better

This commit is contained in:
Aster Fialla
2026-02-23 12:27:25 -05:00
parent 6638756a9a
commit 10c145a02d
4 changed files with 10 additions and 9 deletions

View File

@@ -3,12 +3,12 @@ import { messageHelper } from "./helpers/messageHelper.js";
import {enums} from "./enums.js";
import {commands} from "./commands.js";
import {webhookHelper} from "./helpers/webhookHelper.js";
import * as env from 'dotenv';
import env from 'dotenv';
import {utils} from "./helpers/utils.js";
env.config();
env.config({path: './.env'});
const token = process.env.FLUXER_BOT_TOKEN;
export const token = process.env.FLUXER_BOT_TOKEN;
if (!token) {
console.error("Missing FLUXER_BOT_TOKEN environment variable.");
@@ -84,6 +84,7 @@ export const debounceLogin = utils.debounce(client.login, 60000);
(async () => {
try {
await client.login(token);
// await db.check_connection();
} catch (err) {