Update
This commit is contained in:
parent
6556aa505e
commit
85b7746bb8
1 changed files with 6 additions and 2 deletions
|
@ -28,9 +28,10 @@ class TurnModal(nextcord.ui.Modal):
|
|||
self.add_item(self.text)
|
||||
|
||||
async def callback(self, interaction: nextcord.Interaction) -> None:
|
||||
if interaction.permissions.manage_roles:
|
||||
await interaction.response.send_message("You don't have permission!")
|
||||
if not self.fristrun:
|
||||
if not interaction.permissions.manage_roles:
|
||||
await interaction.response.send_message("You don't have permission!", ephemeral=True)
|
||||
return
|
||||
await interaction.response.edit_message(content=self.message)
|
||||
await interaction.followup.send(f"<{self.turnping}> it is now your turn!\n{self.text.value}")
|
||||
else:
|
||||
|
@ -63,6 +64,9 @@ class GameView(nextcord.ui.View):
|
|||
label="Next Turn", style=nextcord.ButtonStyle.green, custom_id="gameutils:nextturn"
|
||||
)
|
||||
async def nextturn(self, button: nextcord.ui.Button, interaction: nextcord.Interaction):
|
||||
if not interaction.permissions.manage_roles:
|
||||
await interaction.response.send_message("You don't have permission!", ephemeral=True)
|
||||
return
|
||||
ogmsg = interaction.message.content.split("\n")
|
||||
turnmessage = ogmsg[0]
|
||||
ogmsg.pop(0)
|
||||
|
|
Loading…
Reference in a new issue