16 lines
575 B
C#
16 lines
575 B
C#
using NetCord.Services.ComponentInteractions;
|
|
|
|
namespace FluxPose.DiscordBot.Experimenting;
|
|
|
|
public class ButtonCommands : ComponentInteractionModule<ButtonInteractionContext>
|
|
{
|
|
[ComponentInteraction("testButton")]
|
|
public async Task RespondToTestButton()
|
|
{
|
|
await Context.Interaction.SendResponseAsync(InteractionCallback.DeferredMessage());
|
|
|
|
await Context.Message.ModifyAsync(message => message.WithContent($"{Context.Message.Content}a"));
|
|
|
|
await Context.Interaction.ModifyResponseAsync(message => message.WithContent("Clicked!"));
|
|
}
|
|
} |