UNPKG

fast-discord-js

Version:

FastDiscordJS is an unofficial extension of the 'discord.js' library. Our extension aims to simplify the development of Discord bots, promoting cleaner code and easier maintenance.

12 lines (9 loc) 305 B
import dotenv from 'dotenv'; dotenv.config({path: `.env.${process.env.NODE_ENV || 'development'}`}); export function getEnv(key: string): string { const value = process.env[key]; if (!value) { throw new Error(`${key} não foi definido no .env`); } return value; }