Help me with node.js code

How i can get this working?? You guys know what i try to do.
Repl link:

if someone dont understand what i try i can tell that i want that in clientid, token and openaiapikey will be taked from secrets

Isn’t it better to just load the secrets directly?

I mean just

const Discord = require('discord.js');
const chalk = require('chalk');
const fs = require('node:fs');
const config = require('./configs/config.json');

// Load secrets directly
const ClientID = process.env.ClientID;
const Token = process.env.Token;
const OpenAIapiKey = process.env.OpenAIapiKey;

And remove the placeholders from config.json:

    "Prefix": "+",
    "MainColor": "#081BF4",
    "ErrorColor": "#F43108"

which folder should i put these const things then??

wait, i got it. thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.