Ask coding questions

← Back to all posts
How to fix?
HuskyCorgi (1)

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 (2758) [earned 5 cycles]
View Answer
Comments
hotnewtop
VulcanWM (2758)

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

HuskyCorgi (1)

@VulcanWM How would I make one though

VulcanWM (2758)

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

VulcanWM (2758)

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

VulcanWM (2758)

Oh yeah just line 8 cleint to client @HuskyCorgi

HuskyCorgi (1)

@VulcanWM Wait it worked thank you for all your help

VulcanWM (2758)

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