mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix lupupa warning
This commit is contained in:
parent
3791ef4705
commit
d389d0cb30
1 changed files with 9 additions and 7 deletions
|
@ -19,9 +19,11 @@ class Events(commands.Cog):
|
||||||
def cog_unload(self):
|
def cog_unload(self):
|
||||||
self.lupupa_warning_task.stop()
|
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):
|
async def lupupa_warning_task(self):
|
||||||
if lupupa_warning and datetime.now().strftime("%A") == "Thursday":
|
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")
|
channel = discord.utils.get(self.bot.get_guild(guilds[0]).text_channels, name="general")
|
||||||
if channel and channel.can_send():
|
if channel and channel.can_send():
|
||||||
await channel.send(
|
await channel.send(
|
||||||
|
|
Loading…
Reference in a new issue