feat: add debug messages for ticket validation and update PENDING_TASKS.md

This commit is contained in:
Mathis 2026-03-31 22:09:00 +02:00
parent 1e384032be
commit 97f69b4cff
2 changed files with 14 additions and 4 deletions

View file

@ -604,10 +604,14 @@ class Ticket(commands.Cog):
# Détection du format du topic du ticket via regex (robuste)
if not message.channel.topic:
if "validé" in message.content.lower():
await message.channel.send("❌ Debug: `message.channel.topic` est vide ou None.")
return
match = re.search(r"(\d{17,20})", message.channel.topic)
if not match:
if "validé" in message.content.lower():
await message.channel.send(f"❌ Debug: Topic trouvé mais pas d'ID matché. Content: `{message.channel.topic}`")
return
# On ne traite que si le message contient "validé"
@ -623,6 +627,8 @@ class Ticket(commands.Cog):
is_staff = any(r.id == int(staff_role_id) for r in message.author.roles)
if not is_staff and not message.author.guild_permissions.administrator:
if "validé" in message.content.lower():
await message.channel.send("❌ Debug: Permission refusée. Vous n'êtes ni Staff ni Admin.")
return
try: