From 85b7746bb88b51d56a0a957007d03f2c05e7ab63 Mon Sep 17 00:00:00 2001 From: insert Date: Mon, 12 Aug 2024 15:35:28 -0400 Subject: [PATCH] Update --- gameutils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gameutils.py b/gameutils.py index 34b47ff..8e96d35 100644 --- a/gameutils.py +++ b/gameutils.py @@ -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)