Skip to content

Commit

Permalink
Merge pull request #331 from Joshi234/change-paginatedAppearanceOptions
Browse files Browse the repository at this point in the history
Change  PaginatedAppearanceOptions help text to an Embed
  • Loading branch information
Nihlus authored Apr 29, 2024
2 parents 0a4c6e8 + 0ff5e6b commit d960916
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,11 @@ public async Task<Result> HelpAsync()
{
return Result.FromSuccess();
}

return (Result)await _feedback.SendContextualInfoAsync
return (Result)await _feedback.SendContextualEmbedAsync
(
lease.Data.Appearance.HelpText,
lease.Data.SourceUserID,
lease.Data.Appearance.HelpEmbed,
new FeedbackMessageOptions(MessageFlags: MessageFlags.Ephemeral),
this.CancellationToken
ct: this.CancellationToken
);
}

Expand Down
9 changes: 7 additions & 2 deletions Remora.Discord.Pagination/PaginatedAppearanceOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public sealed record PaginatedAppearanceOptions
ButtonComponent Last,
ButtonComponent Close,
ButtonComponent Help,
string FooterFormat = "Page {0}/{1}",
string HelpText = "This is a paginated message. Use the buttons to change page."
Embed HelpEmbed,
string FooterFormat = "Page {0}/{1}"
)
{
/// <summary>
Expand Down Expand Up @@ -83,6 +83,11 @@ public sealed record PaginatedAppearanceOptions
ButtonComponentStyle.Secondary,
Emoji: new PartialEmoji(Name: ""),
Label: nameof(Help)
),
new Embed
(
Title: "Pagination Help",
Description: "Use the buttons below to navigate the pages."
)
);

Expand Down

0 comments on commit d960916

Please sign in to comment.