Spaces:
Running on CPU Upgrade

lunarflu HF Staff commited on
Commit
262ca60
·
1 Parent(s): a52b559

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -62,7 +62,16 @@ async def save_forum(ctx, channel_id: int):
62
  }
63
  messages_data.append(message_data)
64
 
 
 
 
 
65
 
 
 
 
 
 
66
 
67
 
68
 
 
62
  }
63
  messages_data.append(message_data)
64
 
65
+
66
+ print(messages_data)
67
+ with open("gradio-questions.json", 'w', encoding='utf-8') as file:
68
+ file.write(f"{messages_data}\n")
69
 
70
+ await ctx.send(f"Messages from {channel.name} saved to gradio-questions.json")
71
+
72
+ with open("gradio-questions.json", 'rb') as file:
73
+ discord_file = discord.File(file)
74
+ await ctx.send(file=discord_file)
75
 
76
 
77