Update
This commit is contained in:
parent
6173c2944a
commit
a1d80c0d05
1 changed files with 6 additions and 3 deletions
|
@ -99,11 +99,14 @@ class gameutils(commands.Cog):
|
||||||
default_member_permissions=nextcord.Permissions(manage_roles=True),
|
default_member_permissions=nextcord.Permissions(manage_roles=True),
|
||||||
)
|
)
|
||||||
@nextcord.ext.application_checks.has_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"
|
message = f"May the odds ever be in your favor...\n"
|
||||||
for d in range(number):
|
for d in range(number):
|
||||||
message = message + f":game_die:1. {str(random.randint(1, sides))}"
|
message = message + f":game_die:{str(d+1)}. {str(random.randint(1, sides))}\n"
|
||||||
await interaction.response.send_message(message, ephemeral=hidden)
|
if hidden == "Yes":
|
||||||
|
await interaction.response.send_message(message, ephemeral=True)
|
||||||
|
else:
|
||||||
|
await interaction.response.send_message(message, ephemeral=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue