This commit is contained in:
insert 2024-08-11 00:08:37 -04:00
parent f88a169537
commit 9d55a7eb98
Signed by: insert
GPG key ID: A70775C389ACF105

View file

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