#Dotenv

49 messages · Page 1 of 1 (latest)

oak cove
#

The bot runs fine on my home computer, i've pasted the files into the File Manager, anyone got any Ideas?

wispy sinew
#

@oak cove you forget to setup the requirements.txt

tulip moth
#

if you are unsure about something let somebody else offer their help

tulip moth
#

you can google for its name

oak cove
#

I have this installed

tulip moth
#

about pebblehost

#

why are you using dotenv anyways

#

you should just paste your settings directly into your code

#

don't quote me on this but I remember seombody saying you cannot use .env on pebble

oak cove
#

ill try that

#

thanks

woeful bronze
#

@oak cove if you have a valid package.json file your dependencies should be installed automatically

tulip moth
#

they already added it into the node package manager

#

both those methods work but only one is needed

#

if you have sensitive information you can keep them in separate files if you want to keep yourself from accidentally copying it

oak cove
#

I stopped using ENV but I just get another error

woeful bronze
#

It might just be that the address isn't reachable but there was a problem with undici and the new built-in fetch, something do with with DNS and IPv6

#

What Node.js verison are you using?

oak cove
#

16

lofty ploverBOT
#

@oak cove, you just advanced to level 1 !

ebon hare
oak cove
#

no im not using a database

woeful bronze
#

If it still doesn't work, use something like the node-fetch package instead of native fetch for any requests you make

ebon hare
#

.env files are so common and used by everyone mostly

oak cove
#

i think its something to do with the / commands maybe?

woeful bronze
#

You can use .env files

ebon hare
#

@oak cove When does the error shoots? Does it register any slash commands?

oak cove
#

Yeah it starts refreshing them

ebon hare
oak cove
#

no, it should do another thing to them

#

well it does on my pc atleast

#

It says

ebon hare
#

You can use, console.log() at different points in your code and trace down where the error is coming on your code. it will help us a lot if we can know the code

oak cove
#

Started Refreshing Application (/) Commands

(this is the point where the server fails)

Sucessfully reloading application (/) Commands

ebon hare
#

so probably at your command handler?

oak cove
#

yeah, but I have the right nodes installed, I removed the slash commands and just used a normal prefix, and I just got a error again

ebon hare
#

Have you tried taking help from here @oak cove ?

oak cove
#

No, I will do

#

thanks