Supprimer 600 ms pour éviter l'envoi du message à 00:00:00.600

This commit is contained in:
Pierre Berthe 2024-02-12 23:13:37 +01:00
parent 36b9f2efda
commit 217905e6a8

2
bot.py
View file

@ -25,6 +25,8 @@ MY_GUILD = discord.Object(id=GUILD_ID)
tt = datetime.now(ZoneInfo("Europe/Paris")) tt = datetime.now(ZoneInfo("Europe/Paris"))
md = tt.replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(days=1) md = tt.replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(days=1)
# remove 600ms to avoid the bot to send the message at 00:00:00.600
md = md - timedelta(milliseconds=600)
mid = md.timetz() mid = md.timetz()