diff --git a/gameutils.py b/gameutils.py index 122e6d8..d27d46c 100644 --- a/gameutils.py +++ b/gameutils.py @@ -7,6 +7,26 @@ import aiohttp from urllib.parse import urlparse import os +class TurnModal(nextcord.ui.Modal): + def __init__(self,message,turnping): + self.message = message + self.turnping = turnping + super().__init__( + f"set turn message/context" + ) + + self.text = nextcord.ui.TextInput( + label="text", + placeholder="text", + style=TextInputStyle.paragraph, + max_length=1700, + ) + self.add_item(self.text) + + async def callback(self, interaction: nextcord.Interaction) -> None: + await interaction.response.edit_message(content=self.message) + await interaction.followup.send(f"<{self.turnping}> it is now your turn!\n{self.text.value}") + class GameView(nextcord.ui.View): def __init__(self): @@ -46,8 +66,7 @@ class GameView(nextcord.ui.View): pass await interaction.followup.send(f"The round has concluded") else: - await interaction.response.edit_message(content=message) - await interaction.followup.send(f"<{turnping}> it is now your turn!") + await interaction.response.send_modal(TurnModal()) return class gameutils(commands.Cog):