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 21, 2024
2 parents 87afbf7 + 8db8b75 commit e7d95b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions debug.txt
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
début de la taskdébut for 776867184420716584
avant envoi pour 776867184420716584
après envoi pour 776867184420716584
fin for 776867184420716584
début for 507954038420013061
avant envoi pour 507954038420013061
après envoi pour 507954038420013061
fin for 507954038420013061
2 changes: 1 addition & 1 deletion src/MyListen.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ async def on_ready(self) -> None:
MyTask.daily_morning_update.start()
MyTask.update_calendar.start()
await MyTask.update_calendar()
await MyTask.daily_morning_update()
print(f"Ready\nThis bot is owned by {self.bot.owner}")
await self.bot.get_channel(os.getenv("ERROR_CHANNEL_ID")).send("Démarrage du bot")

@component_callback(re.compile("day|week"))
async def on_component(self, ctx: ComponentContext) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/MyTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ async def update_calendar(self) -> None:
ping_chan = self.bot.get_channel(os.getenv("PING_CHANGE_CHANNEL_ID"))
await ping_chan.send(embeds=embeds, ephemeral=False)

@Task.create(TimeTrigger(hour=6, minute=0, utc=False))
@Task.create(TimeTrigger(hour=6, minute=0, seconds=0, utc=False))
async def daily_morning_update(self) -> None:
"""Permet d'envoyer les EDT automatiquement."""
with open("debug.txt", "a", encoding="UTF-8") as f:
f.write("début de la task")
f.write(f"début de la task {datetime.now()}\n\n")
user_base = get_user_base()
# Pour l'envoi hebdomadaire.
if datetime.today().weekday() == 0:
Expand Down

0 comments on commit e7d95b7

Please sign in to comment.