From a1d80c0d059905632bbb96d157289d8eb5a5956e Mon Sep 17 00:00:00 2001 From: insert Date: Sat, 10 Aug 2024 23:13:17 -0400 Subject: [PATCH] Update --- gameutils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gameutils.py b/gameutils.py index da74560..acbbf23 100644 --- a/gameutils.py +++ b/gameutils.py @@ -99,11 +99,14 @@ class gameutils(commands.Cog): default_member_permissions=nextcord.Permissions(manage_roles=True), ) @nextcord.ext.application_checks.has_permissions(manage_roles=True) - async def turngen(self, interaction: nextcord.Interaction, number: int, sides: int, hidden: str = nextcord.SlashOption(choices={"Yes": True, "No": False})): + async def turngen(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" for d in range(number): - message = message + f":game_die:1. {str(random.randint(1, sides))}" - await interaction.response.send_message(message, ephemeral=hidden) + message = message + f":game_die:{str(d+1)}. {str(random.randint(1, sides))}\n" + if hidden == "Yes": + await interaction.response.send_message(message, ephemeral=True) + else: + await interaction.response.send_message(message, ephemeral=False)