diff --git a/Acronymbot.py b/Acronymbot.py index 9068186..c299386 100644 --- a/Acronymbot.py +++ b/Acronymbot.py @@ -28,10 +28,20 @@ class HitOrStand(discord.ui.View): @discord.ui.button(label="Hit", style=discord.ButtonStyle.green) async def hit(self, interaction: discord.Interaction, button: discord.ui.Button): self.content = "h" + for child in self.children: + child.disabled = True + await interaction.response.edit_message(content="You Hit!", view=self) + self.stop() @discord.ui.button(label="Stand", style=discord.ButtonStyle.red) async def stand(self, interaction: discord.Interaction, button: discord.ui.Button): self.content = "s" + for child in self.children: + child.disabled = True + await interaction.response.edit_message(content="You stood!", view=self) + self.stop() + + class Buttons(discord.ui.View): def __init__(self, *, timeout=180): @@ -66,7 +76,7 @@ async def bj(interaction: discord.Interaction): async def discordInput(interaction: discord.Interaction, message:str): response = HitOrStand() await interaction.followup.send(message, view=response) - print(response.content) + await response.wait() return response.content async def discordOutput(interaction: discord.Interaction, message):