Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -225,10 +225,27 @@ async def on_reaction_add(reaction, user):
|
|
225 |
|
226 |
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
@bot.command(name='send_message')
|
229 |
async def send_message(ctx):
|
230 |
channel = ctx.channel
|
231 |
await channel.send("test")
|
|
|
|
|
232 |
|
233 |
|
234 |
|
|
|
225 |
|
226 |
|
227 |
|
228 |
+
|
229 |
+
@bot.command(name='update_leaderboard')
|
230 |
+
async def update_leaderboard(ctx):
|
231 |
+
channel = bot.get_channel(1197143964994773023)
|
232 |
+
message = await channel.fetch_message(1197146219802275840)
|
233 |
+
|
234 |
+
new_leaderboard_data = [("User 1", 120), ("User 2", 90), ("User 3", 70)]
|
235 |
+
new_table = tabulate(new_leaderboard_data, headers=["User", "Score"], tablefmt="plain")
|
236 |
+
|
237 |
+
await message.edit(content=f"Updated Leaderboard:\n```\n{new_table}\n```")
|
238 |
+
|
239 |
+
|
240 |
+
|
241 |
+
|
242 |
+
"""
|
243 |
@bot.command(name='send_message')
|
244 |
async def send_message(ctx):
|
245 |
channel = ctx.channel
|
246 |
await channel.send("test")
|
247 |
+
"""
|
248 |
+
|
249 |
|
250 |
|
251 |
|