#Which editor should I use to run a Discord bot?

34 messages · Page 1 of 1 (latest)

fading thorn
#

Which editor should I use to run a Discord bot?

summer gorge
#

you don't run a bot with an editor?

fading thorn
summer gorge
#

again, you don't run a bot in an editor. some editors may display the terminal, but your bot "runs" anywhere.

#

open a command prompt and run the bot. if it fails, it's not the editor.

#

glitch is some funky online environment? ya, you just don't have things setup properly. has nothing to do with vscode

fading thorn
summer gorge
#

what might you think that error means?

fading thorn
#

i have refreshed the token many times but this is not working

summer gorge
#

you've provided zero useful information, but based on what you've said I can only assume your bot code is attempting to get your API token from an ENV variable which you have not set.

#

what is in that .env file I can see?

fading thorn
#

token

summer gorge
#

the wrong one, or it's not being used in your code.

fading thorn
#

How can I fix

summer gorge
#

understand how your code works and change the token you're using?

#

you can try showing bot.js but nobody here knows what your code is doing...

fading thorn
#

Do you want to see bot.js file?

#

@summer gorge

summer gorge
#

if you want anybody to help you'll need to show code, yes.

fading thorn
#

wait pls

summer gorge
#
client.login(process.env.token);

yet you are not loading dotenv?

#

how do you expect that to work?

fading thorn
#

how do i install i haven't messed with a java project recently

summer gorge
#

java is not javascript

fading thorn
#

we'll try to install it and get back to you

#

I tried to download it by typing npm i dotenv in the terminal but it didn't run the bot, I installed it in the plugins section from visual studio but it didn't work

#

@summer gorge

summer gorge
#

stop pinging me. if you're not going to bother reading the docs on the page I linked, I'm finished.

fading thorn
#

🥺

summer gorge
#

if you installed the package, it takes one line of code. RTFM

fading thorn
#

I'm sorry, I couldn't understand what you said because of the Turkish-English translation mismatch.