Encourage Bot not working

I watched Beau’s Youtube Video for making an Encourage Bot, I made that bot like 2 years ago and published it on one of my discord servers. Today when I opened discord I saw that the bot was offline, I opened uptimerobot, and everything was fine, showing 100% for the last 24 hours, I then went to replit(then repl.it) and I saw some errors, which I wasn’t able to copy. Then I noticed that my .env file isn’t there. Then I realized that they have changed some things and not all the tokens and secrets are shifted to the secrets tab (padlock icon). Then I make a new key of TOKEN only and I reset my token code. I tried to replace the token but it says that you already have a token id, I got confused. Here is the main code
and here is the keep-alive file

please tell me what wrong i have done here and please tell me how to use the secrets tab in replit, I’m not able to understand its documentation

Okay, nvm, i figured it out

I am having a similar problem, what did you do to solve this?

okay so you have to go to the replit code, find the padlock icon from the sidebar, click on it enter your token name (Here it is ), and then type the value of the and save it
After saving it, you can see the TOKEN secret added, now just 2 steps more
When you scroll down the same menu, you’ll see 2 new options with buttons, those buttons will be

  1. import os
  • this would be already added in your code, if you went through the video, as he adds it at the beginning of it
  1. my_secret = os.environ[‘TOKEN’]
    -this is the new version to specify your in your code, as per replit’s new update, the old line (added by Beau Carnes in the video) can be deleted as it is no longer used. Just replace the old line with the new line, and your code might be working just fine

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.