This commit is contained in:
insert 2024-08-12 14:59:05 -04:00
parent f5758968f4
commit 3924ec5955
Signed by: insert
GPG key ID: A70775C389ACF105

View file

@ -160,8 +160,12 @@ class gameutils(commands.Cog):
)
async def diceroll(self, interaction: nextcord.Interaction, number: int, sides: int, hidden: str = nextcord.SlashOption(choices=["Yes", "No"])):
message = f"May the odds ever be in your favor...\n"
fullnum = 0
for d in range(number):
message = message + f":game_die: {str(d+1)}. {str(random.randint(1, sides))}\n"
num = random.randint(1, sides)
fullnum = fullnum + num
message = message + f":game_die: {str(d+1)}. {str(num)}\n"
message = message + f"sum: {fullnum}"
if hidden == "Yes":
await interaction.response.send_message(message, ephemeral=True)
else: