Recursive InternalActionOption list

This commit is contained in:
2024-06-06 16:07:31 +03:00
parent 23961a48b0
commit 1a5f0cbede
4 changed files with 67 additions and 16 deletions

View File

@@ -36,6 +36,24 @@ namespace DiscordBot.Utilities
Rows.Add(row);
}
public Table AsTable()
{
var table = new Table();
table.Border(this.HasRoundBorders ? TableBorder.Rounded : TableBorder.Square);
table.AddColumns(this.Columns.ToArray());
table.ShowRowSeparators = DisplayLinesBetweenRows;
foreach (var row in this.Rows)
{
table.AddRow(row.Select(element => element.Match(
(data) => new Markup(data),
(data) => data
)));
}
return table;
}
public void PrintTable()
{
var table = new Table();