ソースを参照

possibly fixed task error

master
Haku 4年前
コミット
e51a7c671d
2個のファイルの変更4行の追加5行の削除
  1. +3
    -2
      founderlessnotify/__init__.py
  2. +1
    -3
      founderlessnotify/founderlessnotify.py

+ 3
- 2
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())

+ 1
- 3
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()


読み込み中…
キャンセル
保存