Procházet zdrojové kódy

possibly fixed task error

master
Haku před 4 roky
rodič
revize
e51a7c671d
2 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. +3
    -2
      founderlessnotify/__init__.py
  2. +1
    -3
      founderlessnotify/founderlessnotify.py

+ 3
- 2
founderlessnotify/__init__.py Zobrazit soubor

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

+ 1
- 3
founderlessnotify/founderlessnotify.py Zobrazit soubor

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


Načítá se…
Zrušit
Uložit