I’m Creating The Bot For Discord But I Have Eror
ILM
October 24, 2021, 5:16pm
2
Reply doesn’t support env file anymore, use the secrets tab
Hi @NoNameXTX !
Welcome to the forum!
Here the directions on how to properly add env variables in replit.
Also, delete your .env file because you don’t want everyone having access to your secret keys.
Read this post if you are watching the Code a Discord Bot tutorial by FCC and don’t know how to setup your environment variables in replit.
A few months ago, Replit changed how to add environment variables.
The suggestions from the video will not work.
Here is what you do.
Use this starter code from discord.py docs
This is the exact same code from the video.
You can just copy it.
import discord
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {…
system
Closed
April 25, 2022, 5:23am
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.