Pin thread messages
This commit is contained in:
@@ -87,12 +87,16 @@ def run(token: str, config: dict):
|
|||||||
|
|
||||||
message = await thread.fetch_message(thread.id)
|
message = await thread.fetch_message(thread.id)
|
||||||
await message.edit(content = thread_content)
|
await message.edit(content = thread_content)
|
||||||
|
await message.pin()
|
||||||
|
|
||||||
await interaction.send(f"Existing forum thread has been synced {thread.jump_url}", ephemeral=False)
|
await interaction.send(f"Existing forum thread has been synced {thread.jump_url}", ephemeral=False)
|
||||||
return
|
return
|
||||||
|
|
||||||
# If it doesn't exist, create a new thread
|
# If it doesn't exist, create a new thread
|
||||||
thread = await forum.create_thread(name = thread_name, content = thread_content, applied_tags = thread_tags)
|
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 ""}"
|
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)
|
await interaction.send(reply_message, ephemeral=False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user