Ask coding questions

← Back to all posts
Bot token not working
Jeffeet

I added a token to my env and it did not work for some reason.
Please help me if you can because i'm new to Python or discord.py
(Bot token will be regenerated after this)

Voters
Jeffeet
Comments
hotnewtop
CosmicBear

https://replit.com/@CosmicBear/BB#main.py
I forked your code and it seems to work for me. Are you sure the problem has to do with the token? I also spotted some other errors related to Python Syntax.

I noticed that you have a try statement, without except. You should probably include except:pass on a newline.

Jeffeet

@CosmicBear I will try your advice, thank you very much!
Edit: Error is from the token