diff --git a/founderlessnotify/__init__.py b/founderlessnotify/__init__.py index 504f9ff..53ee51d 100644 --- a/founderlessnotify/__init__.py +++ b/founderlessnotify/__init__.py @@ -1,7 +1,8 @@ from .founderlessnotify import FounderlessNotify +from redbot.core.bot import Red -def setup(bot): +def setup(bot: Red): cog = FounderlessNotify(bot) bot.add_cog(cog) - + bot.loop.create_task(cog.bg_loop()) diff --git a/founderlessnotify/founderlessnotify.py b/founderlessnotify/founderlessnotify.py index 7831e30..0e7f888 100644 --- a/founderlessnotify/founderlessnotify.py +++ b/founderlessnotify/founderlessnotify.py @@ -58,11 +58,9 @@ class FounderlessNotify(commands.Cog): self.config = Config.get_conf(self, identifier=82732344, force_registration=True) default_global_settings = {'update_time': 0, 'previous_founderless': [], 'notify_channel': 0} self.config.register_global(**default_global_settings) - self.bg_loop_task = asyncio.create_task(self.bg_loop()) def cog_unload(self): - if self.bg_loop_task: - self.bg_loop_task.cancel() + pass @commands.command() @checks.is_owner()