From 7d2f27f3ad14d2e2a59c335dfde9923bf9276387 Mon Sep 17 00:00:00 2001 From: Misha133 Date: Mon, 27 Jun 2022 14:08:35 +0300 Subject: [PATCH] added an example of `ComponentInteraction` with `ignoreGroupNames = true` --- docs/guides/int_framework/samples/intro/groupmodule.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/guides/int_framework/samples/intro/groupmodule.cs b/docs/guides/int_framework/samples/intro/groupmodule.cs index f0d992aff..a07b2e4d8 100644 --- a/docs/guides/int_framework/samples/intro/groupmodule.cs +++ b/docs/guides/int_framework/samples/intro/groupmodule.cs @@ -16,6 +16,11 @@ public class CommandGroupModule : InteractionModuleBase await RespondAsync(input); + => await RespondAsync(input, components: new ComponentBuilder().WithButton("Echo", $"echoButton_{input}").Build()); + + // Component interaction with ignoreGroupNames set to true + [ComponentInteraction("echoButton_*", true)] + public async Task EchoButton(string input) + => await RespondAsync(input); } } \ No newline at end of file