Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,16 +82,18 @@ async def on_button_click(interaction):
|
|
| 82 |
|
| 83 |
async def try_chaincraft_design(ctx, prompt, private):
|
| 84 |
"""Generates a game design based on a given prompt"""
|
| 85 |
-
print("Starting chaincraft design thread...")
|
| 86 |
try:
|
| 87 |
if ctx.guild.id != CHAINCRAFT_GUILD_ID:
|
| 88 |
return
|
| 89 |
|
| 90 |
message = await ctx.send(f"**{prompt}** - {ctx.author.mention}")
|
|
|
|
| 91 |
if private:
|
| 92 |
thread = await message.create_thread(name=prompt[:100], type=discord.ChannelType.private_thread)
|
| 93 |
else:
|
| 94 |
thread = await message.create_thread(name=prompt[:100])
|
|
|
|
| 95 |
|
| 96 |
active_chaincraft_threads.add(thread.id)
|
| 97 |
output_code = await chaincraft_initial_generation(prompt, thread)
|
|
|
|
| 82 |
|
| 83 |
async def try_chaincraft_design(ctx, prompt, private):
|
| 84 |
"""Generates a game design based on a given prompt"""
|
| 85 |
+
print(f"Starting chaincraft design {"public" if !private else "private"} thread...")
|
| 86 |
try:
|
| 87 |
if ctx.guild.id != CHAINCRAFT_GUILD_ID:
|
| 88 |
return
|
| 89 |
|
| 90 |
message = await ctx.send(f"**{prompt}** - {ctx.author.mention}")
|
| 91 |
+
print("Thread message ", message)
|
| 92 |
if private:
|
| 93 |
thread = await message.create_thread(name=prompt[:100], type=discord.ChannelType.private_thread)
|
| 94 |
else:
|
| 95 |
thread = await message.create_thread(name=prompt[:100])
|
| 96 |
+
print("Created thread ", thread)
|
| 97 |
|
| 98 |
active_chaincraft_threads.add(thread.id)
|
| 99 |
output_code = await chaincraft_initial_generation(prompt, thread)
|