From 575a5859374afa24d2169ea4cb52445e50a81f97 Mon Sep 17 00:00:00 2001 From: Michael <20937441+KMikeeU@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:04:58 +0200 Subject: [PATCH] Pin thread messages --- master-bot/discord_api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/master-bot/discord_api.py b/master-bot/discord_api.py index 113b121..6dfb674 100644 --- a/master-bot/discord_api.py +++ b/master-bot/discord_api.py @@ -87,12 +87,16 @@ def run(token: str, config: dict): message = await thread.fetch_message(thread.id) await message.edit(content = thread_content) + await message.pin() await interaction.send(f"Existing forum thread has been synced {thread.jump_url}", ephemeral=False) return # If it doesn't exist, create a new thread thread = await forum.create_thread(name = thread_name, content = thread_content, applied_tags = thread_tags) + message = await thread.fetch_message(thread.id) + await message.pin() + reply_message = f"Forum channel created! {thread.jump_url}{" No tags were found, are you sure this was a Master LVA?" if len(thread_tags) == 0 else ""}" await interaction.send(reply_message, ephemeral=False)