Update
This commit is contained in:
parent
3637e72ff3
commit
6173c2944a
1 changed files with 14 additions and 0 deletions
14
gameutils.py
14
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))
|
Loading…
Reference in a new issue