add: Added .quteedit command

add: Added an edit button to .quoteshow and .exprshow commands that opens a modal which lets you edit the quote or expr in question
This commit is contained in:
Kwoth
2024-05-21 00:33:40 +00:00
parent b51ce34190
commit 06321380ee
17 changed files with 313 additions and 78 deletions

View File

@@ -34,11 +34,11 @@ public partial class ResponseBuilder
if (_paginationBuilder.AddPaginatedFooter)
embed.AddPaginatedFooter(currentPage, lastPage);
NadekoInteraction? maybeInter = null;
NadekoInteractionBase? maybeInter = null;
var model = await _builder.BuildAsync(ephemeral);
async Task<(NadekoButtonInteraction left, NadekoInteraction? extra, NadekoButtonInteraction right)>
async Task<(NadekoButtonInteractionHandler left, NadekoInteractionBase? extra, NadekoButtonInteractionHandler right)>
GetInteractions()
{
var leftButton = new ButtonBuilder()
@@ -47,7 +47,7 @@ public partial class ResponseBuilder
.WithEmote(InteractionHelpers.ArrowLeft)
.WithDisabled(lastPage == 0 || currentPage <= 0);
var leftBtnInter = new NadekoButtonInteraction(_client,
var leftBtnInter = new NadekoButtonInteractionHandler(_client,
model.User?.Id ?? 0,
leftButton,
(smc) =>
@@ -80,7 +80,7 @@ public partial class ResponseBuilder
.WithEmote(InteractionHelpers.ArrowRight)
.WithDisabled(lastPage == 0 || currentPage >= lastPage);
var rightBtnInter = new NadekoButtonInteraction(_client,
var rightBtnInter = new NadekoButtonInteractionHandler(_client,
model.User?.Id ?? 0,
rightButton,
(smc) =>