Ask coding questions

← Back to all posts
so i've been trying to make a discord bot! but i have two problems
K1NG01L (0)

1.i tried to hide the token in secrets but for some reason i'm not doing it right sadly

2.also when i try to run the code nothing happens

Answered by VulcanWM (2778) [earned 5 cycles]
View Answer
Comments
hotnewtop
VulcanWM (2778)

to get the token in secrets you have to do os.getenv(“KEY_NAME”)
And to run the bot you have to do client.run(token)

K1NG01L (0)

@VulcanWM hmm it says "IndentationError: unindent does not match any outer indentation level"

VulcanWM (2778)

Ah so do ctrl + a
Then tab
Then shift + tab @K1NG01L

VulcanWM (2778)

Yay can u mark the comment as the answer please? @K1NG01L