Skip to content

Commit

Permalink
use loadEnv method in register.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Saitharun279 authored Nov 3, 2024
1 parent 327bff8 commit e29109b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { config } from "dotenv";
import { DISCORD_BASE_URL } from "./constants/urls";
import { registerCommands } from "./utils/registerCommands";
import { loadEnv } from "../config/config";

config();

Expand Down Expand Up @@ -56,8 +57,10 @@ async function registerGuildCommands(
}
}

const envLoadedFromProcess = loadEnv({}, false);

registerGuildCommands(
process.env.DISCORD_TOKEN,
process.env.DISCORD_APPLICATION_ID,
process.env.DISCORD_GUILD_ID
envLoadedFromProcess.DISCORD_TOKEN,
envLoadedFromProcess.DISCORD_APPLICATION_ID,
envLoadedFromProcess.DISCORD_GUILD_ID
);

0 comments on commit e29109b

Please sign in to comment.