Ask coding questions

← Back to all posts
My Discord bot is not getting online

So I am really new to coding and I was trying to code a Discord bot but It won't go online. The tutorial I am watching is outdated meaning there is a line in the code that I do not know how to fix. The part I am having trouble with is the .env part since it's been changed to a secret instead of .env which is what I think is causing this problem but again I am new and would like some help cause I do not know


I did that but sadly it is still not working because there is something wrong with the os.getenv line of code probably because I made a secret and originally was a .env file.


To add a secret, click the padlock icon on the left-hand side of the editor, and enter the word TOKEN (all in capitals) in the key section; your bot token in the value section, and then click Add new secret. .env files are deprecated, meaning you can remove your .env file.