Fix lupupa warning

This commit is contained in:
EEKIM10 2022-10-13 11:13:22 +01:00
parent 3791ef4705
commit d389d0cb30

View file

@ -19,9 +19,11 @@ class Events(commands.Cog):
def cog_unload(self):
self.lupupa_warning_task.stop()
@tasks.loop(time=[time(10, 0, 0), time(13, 30, 0)])
@tasks.loop(minutes=2)
async def lupupa_warning_task(self):
if lupupa_warning and datetime.now().strftime("%A") == "Thursday":
now = datetime.now().time()
if (now.hour == 10 and now.minute in range(0, 2)) or (now.hour == 11 and now.minute in range(29, 32)):
channel = discord.utils.get(self.bot.get_guild(guilds[0]).text_channels, name="general")
if channel and channel.can_send():
await channel.send(