Spaces:
Paused
Paused
Update dice.py
Browse files
dice.py
CHANGED
|
@@ -13,7 +13,7 @@ async def roll_dice(interaction: discord.Interaction, bet: int):
|
|
| 13 |
balance = user_cash.get(user_id, 0)
|
| 14 |
|
| 15 |
if bet <= 0:
|
| 16 |
-
await interaction.response.send_message("
|
| 17 |
return
|
| 18 |
|
| 19 |
if bet > balance:
|
|
@@ -46,7 +46,10 @@ async def roll_dice(interaction: discord.Interaction, bet: int):
|
|
| 46 |
roll_again_button = discord.ui.Button(style=discord.ButtonStyle.primary, label="Roll Again", custom_id="roll_again")
|
| 47 |
|
| 48 |
async def roll_again_callback(interaction: discord.Interaction):
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
roll_again_button.callback = roll_again_callback
|
| 52 |
|
|
|
|
| 13 |
balance = user_cash.get(user_id, 0)
|
| 14 |
|
| 15 |
if bet <= 0:
|
| 16 |
+
await interaction.response.send_message("Bet Higher than 0 Idiot.")
|
| 17 |
return
|
| 18 |
|
| 19 |
if bet > balance:
|
|
|
|
| 46 |
roll_again_button = discord.ui.Button(style=discord.ButtonStyle.primary, label="Roll Again", custom_id="roll_again")
|
| 47 |
|
| 48 |
async def roll_again_callback(interaction: discord.Interaction):
|
| 49 |
+
if interaction.user.id == user_id:
|
| 50 |
+
await roll_dice(interaction, bet)
|
| 51 |
+
else:
|
| 52 |
+
await interaction.response.send_message("you cant roll this", ephemeral=True)
|
| 53 |
|
| 54 |
roll_again_button.callback = roll_again_callback
|
| 55 |
|