Ask coding questions

← Back to all posts
How to fix?
HuskyCorgi

This is an outdated tutorial that uses an .env file so I don't know how I would make it so that it still works without the .env file

Link: https://www.freecodecamp.org/news/create-a-discord-bot-with-python/

Answered by VulcanWM [earned 5 cycles]
View Answer
Voters
HuskyCorgi
Comments
hotnewtop
VulcanWM

On the left hand side of the repl you should see a padlock. Click on the padlock to see all your .env stuff

HuskyCorgi

@VulcanWM How would I make one though

VulcanWM

it will show a box with key and value, add your env key name and value and then you can use the code you used for getting the token @HuskyCorgi

HuskyCorgi

Okay cool @VulcanWM

VulcanWM

works? @HuskyCorgi

HuskyCorgi

@VulcanWM is this it

VulcanWM

Yeah but instead in the key enter TOKEN and in the value enter the token @HuskyCorgi

HuskyCorgi

@VulcanWM Trying it now.

HuskyCorgi
HuskyCorgi

@VulanWM is that okay?

VulcanWM

Oh yeah just line 8 cleint to client @HuskyCorgi

HuskyCorgi
HuskyCorgi

@VulcanWM Wait it worked thank you for all your help

VulcanWM

np! Mark the comment as the answer :) @HuskyCorgi