Ask coding questions

← Back to all posts
Why does this code work in command prompt but not on
frenchwarrior (0)

Here I have attached my very basic discord bot using this api:

This code works completely fine when I use it in command prompt:

but it gives me a mountain of errors when run in

I can't figure out why and hence why I am asking for help on the forums.

Does anyone know why this code does not work on, but works fine in command prompt?

InvisibleOne (2677)

Well it's saying that'TOKEN')) is returning nothing, I'm assuming you have an .env file with TOKEN="blablabla" in it.
Also it could be an error due to the fact that Replit uses Linux while you are using Windows.