This commit is contained in:
insert 2024-08-12 15:35:28 -04:00
parent 6556aa505e
commit 85b7746bb8
Signed by: insert
GPG key ID: A70775C389ACF105

View file

@ -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)