Ask coding questions

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

Here I have attached my very basic discord bot using this api: https://github.com/Duerocraft/AternosAPI

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

but it gives me a mountain of errors when run in repl.it:

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

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

Comments
hotnewtop
InvisibleOne (2677)

Well it's saying that client.run(os.getenv('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.