-
When the command is executed, select_Foo is called, and when SelectOption is selected, the second question, select_Bar, is called. After that, a reply message is finally sent with the values of Foo and Bar. After that, I want to perform an appropriate action on the select value and deactivate the corresponding select item.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
class Bar(discord.ui.View):
def __init__(self, data, timeout=10):
super().__init__(timeout=timeout)
self.data = data
@discord.ui.select(min_values=1, max_values=1, options=[discord.SelectOption(label='A'), discord.SelectOption(label='B')])
async def callback(self, interaction: discord.Interaction, select: discord.ui.Select):
self.callback.disabled = True
await interaction.response.send_message(f'Foo {self.data} / Bar {select.values[0]}', view=self) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
You're editing the message with a brand new view, instead of using the one you just modified("self")Misread, you're not editing the message at all