Fix background task examples

This commit is contained in:
Rapptz committed 2022-03-14 06:08:54 -04:00
1 parent 9b77331603
commit c95c163266
2 files changed
+2

No files matched your search

+1
View File
@@ -5,6 +5,7 @@ class MyClient(discord.Client):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def setup_hook(self) -> None:
# create the background task and run it in the background
self.bg_task = self.loop.create_task(self.my_background_task())