From 179876d2ce2b51ec2cbb7fc1b382ac0c5a7de13d Mon Sep 17 00:00:00 2001 From: Mow910 Date: Sat, 14 Feb 2026 18:32:32 +0100 Subject: [PATCH] Raison pour le titre du post dans le forum --- discordbot/moderation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/discordbot/moderation.py b/discordbot/moderation.py index 6bf6b0a..4935080 100644 --- a/discordbot/moderation.py +++ b/discordbot/moderation.py @@ -1063,7 +1063,8 @@ async def handle_staff_help_command(message: Message, bot): " Ex: `!transfert #entraide 123456789012345678`\n" " Ex: `!transfert #général https://discord.com/channels/.../...`\n" " Le message sera envoyé comme si c'était l'auteur original\n" - " Supporte les canaux textuels, threads et forums (crée un post)" + " Supporte les canaux textuels, threads et forums (crée un post)\n" + " Pour les forums, la raison devient le titre du post" ), inline=False ) @@ -1562,7 +1563,10 @@ async def handle_transfer_command(message: Message, bot): if isinstance(target_channel, ForumChannel): try: post_title = f"{original_message.author.display_name} - " - if content and len(content) > 0: + if reason and reason != "Message posté dans le mauvais canal": + remaining_length = 100 - len(post_title) + post_title += reason[:remaining_length] + elif content and len(content) > 0: remaining_length = 100 - len(post_title) post_title += content[:remaining_length] else: