Spaces:
Building
Building
Update petroll.py
Browse files- petroll.py +5 -5
petroll.py
CHANGED
@@ -10,7 +10,7 @@ from cash import user_cash
|
|
10 |
luck_multipliers = {}
|
11 |
luck_expiration = {}
|
12 |
luck_opportunities = {}
|
13 |
-
used_luck_opportunities =
|
14 |
first_luck_claimed = set()
|
15 |
auto_roll_users = set()
|
16 |
|
@@ -214,7 +214,7 @@ async def schedule_next_luck_opportunity(interaction: discord.Interaction, user_
|
|
214 |
return
|
215 |
|
216 |
if user_id in used_luck_opportunities and len(used_luck_opportunities[user_id]) >= 4:
|
217 |
-
await interaction.response.send_message("You have already used all your luck.", ephemeral=True)
|
218 |
return
|
219 |
|
220 |
current_luck = luck_multipliers.get(user_id, 1)
|
@@ -252,7 +252,7 @@ async def auto_roll(interaction: discord.Interaction):
|
|
252 |
if result:
|
253 |
await interaction.followup.send(embed=result[0], view=result[1])
|
254 |
else:
|
255 |
-
await interaction.followup.send("
|
256 |
await asyncio.sleep(5) # Wait for 5 seconds between rolls
|
257 |
|
258 |
@app_commands.command(name="petroll", description="Roll for a random pet")
|
@@ -262,7 +262,7 @@ async def petroll(interaction: discord.Interaction):
|
|
262 |
if result:
|
263 |
await interaction.followup.send(embed=result[0], view=result[1])
|
264 |
else:
|
265 |
-
await interaction.followup.send("
|
266 |
|
267 |
@app_commands.command(name="balance", description="Check your current balance")
|
268 |
async def balance(interaction: discord.Interaction):
|
@@ -322,4 +322,4 @@ async def roll_dice(interaction: discord.Interaction, bet: int):
|
|
322 |
new_view = discord.ui.View()
|
323 |
new_view.add_item(roll_again_button)
|
324 |
|
325 |
-
await interaction.response.
|
|
|
10 |
luck_multipliers = {}
|
11 |
luck_expiration = {}
|
12 |
luck_opportunities = {}
|
13 |
+
used_luck_opportunities = {}
|
14 |
first_luck_claimed = set()
|
15 |
auto_roll_users = set()
|
16 |
|
|
|
214 |
return
|
215 |
|
216 |
if user_id in used_luck_opportunities and len(used_luck_opportunities[user_id]) >= 4:
|
217 |
+
await interaction.response.send_message("You have already used all your luck opportunities.", ephemeral=True)
|
218 |
return
|
219 |
|
220 |
current_luck = luck_multipliers.get(user_id, 1)
|
|
|
252 |
if result:
|
253 |
await interaction.followup.send(embed=result[0], view=result[1])
|
254 |
else:
|
255 |
+
await interaction.followup.send("An error occurred.")
|
256 |
await asyncio.sleep(5) # Wait for 5 seconds between rolls
|
257 |
|
258 |
@app_commands.command(name="petroll", description="Roll for a random pet")
|
|
|
262 |
if result:
|
263 |
await interaction.followup.send(embed=result[0], view=result[1])
|
264 |
else:
|
265 |
+
await interaction.followup.send("An error occurred.")
|
266 |
|
267 |
@app_commands.command(name="balance", description="Check your current balance")
|
268 |
async def balance(interaction: discord.Interaction):
|
|
|
322 |
new_view = discord.ui.View()
|
323 |
new_view.add_item(roll_again_button)
|
324 |
|
325 |
+
await interaction.response.edit_
|