This commit is contained in:
insert 2024-08-10 23:08:54 -04:00
parent 3637e72ff3
commit 6173c2944a
Signed by: insert
GPG key ID: A70775C389ACF105

View file

@ -92,6 +92,20 @@ class gameutils(commands.Cog):
pass pass
await interaction.followup.send(f"<@{users[0].id}> it is now your turn!") await interaction.followup.send(f"<@{users[0].id}> it is now your turn!")
@nextcord.slash_command(
name="dice",
description="Roll a number of dice",
guild_ids=[1247883904178978927,699285282276507708],
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})):
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)
def setup(bot: commands.Bot): def setup(bot: commands.Bot):
bot.add_cog(gameutils(bot)) bot.add_cog(gameutils(bot))