Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
await user.send(f"xp_data: {xp_data}")
Browse files
app.py
CHANGED
@@ -49,6 +49,13 @@ async def on_message(message):
|
|
49 |
xp_data[author_id] += XP_PER_MESSAGE
|
50 |
print(f"xp_data: {xp_data}")
|
51 |
save_xp_data()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
await bot.process_commands(message)
|
53 |
except Exception as e:
|
54 |
print(f"Error: {e}")
|
|
|
49 |
xp_data[author_id] += XP_PER_MESSAGE
|
50 |
print(f"xp_data: {xp_data}")
|
51 |
save_xp_data()
|
52 |
+
|
53 |
+
user = bot.get_user(811235357663297546)
|
54 |
+
try:
|
55 |
+
await user.send(f"xp_data: {xp_data}")
|
56 |
+
except discord.HTTPException:
|
57 |
+
await ctx.send("Failed to send a DM.")
|
58 |
+
|
59 |
await bot.process_commands(message)
|
60 |
except Exception as e:
|
61 |
print(f"Error: {e}")
|