Splitting up, doesn't work
This commit is contained in:
16
FluxPoseDiscordBot/Experimenting/ButtonCommands.cs
Normal file
16
FluxPoseDiscordBot/Experimenting/ButtonCommands.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
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!"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user