Fix background task examples

This commit is contained in:
Rapptz
2022-03-14 06:08:54 -04:00
parent 9b77331603
commit c95c163266
2 changed files with 2 additions and 0 deletions

View File

@ -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()