Bot goes offline after 10-20secs #7204
-
Hello. I'm a new user just started writing bots with discord.py. Recently I've written a ModMail bot. When i try running the bot, it does get online and responds to commands, as expected. But after 10-20 seconds, the bot goes offline but the python file in my pc still running, no errors in console. Can anyone help me with this? EDIT: Here's my bot log |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You have the event loop blocked because of your use of the There will also be issues because you define and start tasks inside of As for your immediate issue, consider using a database to store data persistently. |
Beta Was this translation helpful? Give feedback.
You have the event loop blocked because of your use of the
with
context manager without yielding from it.There will also be issues because you define and start tasks inside of
on_ready
and changing presence every 4 seconds.As for your immediate issue, consider using a database to store data persistently.