Answer the question
In order to leave comments, you need to log in
Discord.py bot Quit?
Good day!
I want to make a bot that will automatically leave the server in half an hour. I didn’t find anything like this in the documentation. I wrote the following code:
@bot.event
async def on_connect():
print("10")
await asyncio.sleep(1800)
await bot.leave_guild()
Answer the question
In order to leave comments, you need to log in
Use a timer
Let's use the if function and when the timer comes to an end, start the execution of the exit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question