diff --git a/gameutils.py b/gameutils.py index 1fd693e..da74560 100644 --- a/gameutils.py +++ b/gameutils.py @@ -92,6 +92,20 @@ class gameutils(commands.Cog): pass 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): bot.add_cog(gameutils(bot)) \ No newline at end of file