mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-03-17 08:45:02 +00:00
Fix background task examples
This commit is contained in:
@@ -9,6 +9,7 @@ class MyClient(discord.Client):
|
||||
# an attribute we can access from our task
|
||||
self.counter = 0
|
||||
|
||||
async def setup_hook(self) -> None:
|
||||
# start the task to run in the background
|
||||
self.my_background_task.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user