this is my code:
class ConfirmOrderMenu(discord.ui.View):
def __init__(self):
super().__init__()
self.value = None
@discord.ui.button(label = "Confirm Order", style = discord.ButtonStyle.green)
async def confirm(self, button: discord.ui.Button, interaction: discord.Interaction):
print("success")
self.value = "confirm"
self.stop
@discord.ui.button(label = "Cancel Order", style = discord.ButtonStyle.red)
async def cancel(self, button: discord.ui.Button, interaction: discord.Interaction):
print("canceled")
self.value = "cancel"
self.stop
@client.tree.command(name = "bolt")
async def bolt(interaction: discord.Interaction):
menu = ConfirmOrderMenu()
temp_channel = client.get_channel(temp_channel.id)
await temp_channel.send(f"<@{interaction.user.id}>")
await temp_channel.send(embed=confirm_order_embed, view=menu)
await menu.wait()
if menu.value == "confirm":
print("ok")
im trying to get it to print ok