-
Please take a look at this example. [SlashCommand("example", "Command description.")]
public async Task CommandAsync()
{
await RespondAsync("Please click this button.",
components: new ComponentBuilder()
.WithSelectMenu(
new SelectMenuBuilder()
.WithCustomId("click-submit")
.WithOptions([new("First option", "first"), new("And second option", "second")])
)
.Build(),
ephemeral: true
);
}
[ComponentInteraction("click-submit")]
public async Task SubmitReport(string[] selected)
{
// ...
} How do I modify the message sent from CommandAsync when the button is clicked? Is that even possible? I tried using In short, I need to modify the message sent from What am I doing wrong? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
Misha-133
Sep 1, 2024
Replies: 1 comment 3 replies
-
in the var interaction = (IComponentInteraction)Context.Interaction;
await interaction.UpdateAsync(x => x.XXXX); Also these might come helpful |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
marss72
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in the
SubmitReport
method do something likeAlso these might come helpful