Hi @KaitoAM, welcome to the community!
Can you please provide more information and a link to your Repl?
Thats u mean?
I don’t seem to know what your problem is but i noticed some things:
Are you using the intents from discord? (Since 2021 you have to use intents)
At the bottom of your code you are using:
try: keep_alive.keep_alive() bot.run(os.getenv("TOKEN")) except: os.system("kill 1") keep_alive.keep_alive() bot.run(os.getenv("TOKEN"))
I don’t know if getenv still works but you should use the secret function from replit.
- Give more details about your problem, what are you trying to do? Does your code stop running after you type a command?
os.environ.get("TOKEN") are also ways to get the environment variables in Python.
I keep seeing this specific line. It comes from a no longer working package. You can’t ping your Repl from the inside to keep it alive.
Then what to do what should I place
Im trying to do an 24/7 hour discord bot
My goal from this code is
Make a discord bot work 24/7
And I use SECRET for the token
Shall I delete this line or what
Or tell me the correct form of it