This repository has been archived on 2024-12-22. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
elliebot/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs
2024-07-07 18:10:58 +12:00

22 lines
No EOL
634 B
C#

namespace EllieBot;
public sealed class EllieButtonInteractionHandler : EllieInteractionBase
{
public EllieButtonInteractionHandler(
DiscordSocketClient client,
ulong authorId,
ButtonBuilder button,
Func<SocketMessageComponent, Task> onAction,
bool onlyAuthor,
bool singleUse = true,
bool clearAfter = true)
: base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse, clearAfter)
{
Button = button;
}
public ButtonBuilder Button { get; }
public override void AddTo(ComponentBuilder cb)
=> cb.WithButton(Button);
}