potential fix for private threads

This commit is contained in:
zeragonii 2024-10-21 18:52:57 +00:00
parent 465a487723
commit 974057cd58
1 changed files with 3 additions and 4 deletions

7
bot.py
View File

@ -58,10 +58,9 @@ async def on_ready():
@app_commands.describe(
type="Are you wanting to push? Or clear?",
dungeon="Name of the dungeon",
level="Keystone level",
private="Should the thread be private?"
level="Keystone level"
)
async def lfm(interaction: discord.Interaction, type: str, dungeon: str, level: int, private: bool = False):
async def lfm(interaction: discord.Interaction, type: str, dungeon: str, level: int):
# The ID of the allowed channel
allowed_channel_id = 1297217492699320462 # Replace this with the correct channel ID
@ -99,7 +98,7 @@ async def lfm(interaction: discord.Interaction, type: str, dungeon: str, level:
thread_name = f"{full_dungeon_name} - +{level} - {type.capitalize()}"
# Create the thread
thread = await interaction.channel.create_thread(name=thread_name, message=interaction.message, invitable=not private)
thread = await interaction.channel.create_thread(name=thread_name, message=interaction.message)
# Tag the user in the message
user_mention = interaction.user.mention # This will mention the user