Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

My Discord bot is not getting online

Cinzig
Cinzig

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

1 year ago

Voters

Comments

TopNew
1
MrJulmust
MrJulmust

A little late but you first need to type "TOKEN = os.environ['tokenname']" and then "client.run(TOKEN)". That worked for me

7 months ago
1
Cinzig
Cinzig

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.

1 year ago
3
connor
connor

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.

1 year ago
Load more