Update
This commit is contained in:
parent
f17b9723b7
commit
6d4157fc9a
1 changed files with 5 additions and 4 deletions
|
@ -17,8 +17,9 @@ class GameView(nextcord.ui.View):
|
||||||
)
|
)
|
||||||
async def nextturn(self, button: nextcord.ui.Button, interaction: nextcord.Interaction):
|
async def nextturn(self, button: nextcord.ui.Button, interaction: nextcord.Interaction):
|
||||||
ogmsg = interaction.message.content.split("\n")
|
ogmsg = interaction.message.content.split("\n")
|
||||||
|
turnmessage = ogmsg[0]
|
||||||
ogmsg.pop(0)
|
ogmsg.pop(0)
|
||||||
message = "It has been decreed..\n"
|
message = f"{turnmessage}\n"
|
||||||
found = False
|
found = False
|
||||||
turnover = False
|
turnover = False
|
||||||
for i in range(len(ogmsg)):
|
for i in range(len(ogmsg)):
|
||||||
|
@ -62,12 +63,12 @@ class gameutils(commands.Cog):
|
||||||
@nextcord.slash_command(
|
@nextcord.slash_command(
|
||||||
name="turngen",
|
name="turngen",
|
||||||
description="Roll the next turn for a certian role",
|
description="Roll the next turn for a certian role",
|
||||||
guild_ids=[1247883904178978927],
|
guild_ids=[1247883904178978927,699285282276507708],
|
||||||
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, role: nextcord.Role):
|
async def turngen(self, interaction: nextcord.Interaction, role: nextcord.Role, turnmessage: str):
|
||||||
message = "It has been decreed..\n"
|
message = f"{turnmessage}\n"
|
||||||
users = role.members
|
users = role.members
|
||||||
random.shuffle(users)
|
random.shuffle(users)
|
||||||
for i in range(len(users)):
|
for i in range(len(users)):
|
||||||
|
|
Loading…
Reference in a new issue