Update timerole.py

pull/67/head
Ianardo DiCaprio 6 years ago committed by GitHub
parent 42e7d9262f
commit 6cba1bac32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,6 +21,7 @@ class Timerole(Cog):
self.config.register_global(**default_global) self.config.register_global(**default_global)
self.config.register_guild(**default_guild) self.config.register_guild(**default_guild)
self.updating = self.bot.loop.create_task(self.check_day())
@commands.command() @commands.command()
@checks.guildowner() @checks.guildowner()
@ -194,9 +195,5 @@ class Timerole(Cog):
async def check_day(self): async def check_day(self):
while self is self.bot.get_cog("Timerole"): while self is self.bot.get_cog("Timerole"):
print("Hmmmm") print("Hmmmm")
await asyncio.sleep(30)
await self.timerole_update() await self.timerole_update()
await asyncio.sleep(86400)
await asyncio.sleep(3)
# then start loop over again

Loading…
Cancel
Save