Ask coding questions

← Back to all posts
i am getting a error i don't know how to fix . please help if you can
kingragul

error in running a code

Voters
kingragul
Comments
hotnewtop
VulcanWM

In which line do you define the token?

kingragul

@VulcanWM in line 44 in main.py getting details from the configuration file

VulcanWM

You should keep your bot token secret as anyone with it can run your bot and hack the code
you should save it in the secrets tab with the key TOKEN and then use the code os.getenv(“TOKEN”) to get the token from the secrets @kingragul

kingragul

[email protected] I removed it sorry I am new to this . Can you check the program with your key and fix the error

VulcanWM

can you invite me to the repl? @kingragul

kingragul

@VulcanWM done :)

VulcanWM

thanks! @kingragul

VulcanWM

wait can you just enter the token in the code because i cant see it at all rn @kingragul

kingragul

@VulcanWM sure

kingragul

@VulcanWM check it in config.json file .

VulcanWM

dont have discord sorry @kingragul

kingragul

@VulcanWM after you come just ping @here. I will hope on and let see error causing this .