I am using Python with discord.py
. Documentation here
I\'ve got a bot that is running on a Discord server that links the server with a subr
You can add a function to the bot event loop with Client.loop.create_task(search_submissions())
like this:
async def search_submissions():
pass
client = discord.Client()
client.loop.create_task(search_submissions())
client.run(TOKEN)
Update:
If you want your function to continue working you can put it in a while loop with some sleeping in between:
async def search_submissions():
while(true):
# do your stuff
await asyncio.sleep(1)