From 3b4496de5b69ee0306e699d4fef29b38593b6184 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Wed, 8 Oct 2025 16:56:43 +0200 Subject: [PATCH] Renamed mot to word and data_dir to todos_dir --- src/main.py | 2 +- src/todos_manager/todos_manager.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.py b/src/main.py index 230f715..db23679 100644 --- a/src/main.py +++ b/src/main.py @@ -15,7 +15,7 @@ async def on_message(message: discord.Message): if "bonjour" in words: await channel.send("bien dormii ?? (˶ᵔᵕᵔ˶)₊˚⊹♡") - if any(mot in words for mot in ["oui", "ui", "ouai", "ouaip", "yes", "yep"]) and not message.content.__contains__("?"): + if any(word in words for word in ["oui", "ui", "ouai", "ouaip", "yes", "yep"]) and not message.content.__contains__("?"): await channel.send("trow bienn~ (˶ᵔᵕᵔ˶) ‹𝟹") if "<@1169377208893194275>" in words: diff --git a/src/todos_manager/todos_manager.py b/src/todos_manager/todos_manager.py index 4bcb207..157724c 100644 --- a/src/todos_manager/todos_manager.py +++ b/src/todos_manager/todos_manager.py @@ -1,10 +1,11 @@ import os class TodosManager: - def __init__(self, data_dir="compteur_electrique_data/todos/"): + def __init__(self, todos_dir="compteur_electrique_data/todos/"): try: - os.makedirs(data_dir, exist_ok=True) + os.makedirs(todos_dir, exist_ok=True) except OSError as error: - print(f"Error during creation of \"{data_dir}\" directory") + print(f"Error during creation of \"{todos_dir}\" directory") exit(1) - self.data_dir=data_dir + self.todos_dir=todos_dir +