Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
danydudiot committed Aug 19, 2024
2 parents b4c8675 + 647cdfe commit ea2635c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file modified data/UserBase.pkl
Binary file not shown.
6 changes: 5 additions & 1 deletion src/MyTask.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import asyncio

from interactions import Client, Task, TimeTrigger, OrTrigger, Embed, Extension
from datetime import datetime
from dotenv import load_dotenv
Expand Down Expand Up @@ -73,7 +75,9 @@ async def daily_morning_update(self) -> None:
if datetime.today().weekday() == 0:
for id in user_base.weekly_subscribed_users:
await self.tool.send_weekly_update(self.bot.get_user(id))
await asyncio.sleep(1) # Sinon ça fait une pile d'envoi et ça envoie un message plusieurs fois
# Pour l'envoi quotidien.
if datetime.today().weekday() <= 4: # Si on est le week end
for id in user_base.daily_subscribed_users:
await self.tool.send_daily_update(self.bot.get_user(id))
await self.tool.send_daily_update(self.bot.get_user(id))
await asyncio.sleep(1) # Sinon ça fait une pile d'envoi et ça envoie un message plusieurs fois

0 comments on commit ea2635c

Please sign in to comment.