Cleaned up embedbuilder calls to use parameters instead of footer builder

This commit is contained in:
Kwoth
2021-07-07 22:52:47 +02:00
parent ac9f84715b
commit cbecd823c1
26 changed files with 199 additions and 153 deletions

View File

@@ -170,9 +170,9 @@ namespace NadekoBot.Extensions
public static EmbedBuilder AddPaginatedFooter(this EmbedBuilder embed, int curPage, int? lastPage)
{
if (lastPage != null)
return embed.WithFooter(efb => efb.WithText($"{curPage + 1} / {lastPage + 1}"));
return embed.WithFooter($"{curPage + 1} / {lastPage + 1}");
else
return embed.WithFooter(efb => efb.WithText(curPage.ToString()));
return embed.WithFooter(curPage.ToString());
}
public static EmbedBuilder WithOkColor(this EmbedBuilder eb) =>

View File

@@ -21,7 +21,7 @@ namespace NadekoBot.Extensions
if (url != null && Uri.IsWellFormedUriString(url, UriKind.Absolute))
eb.WithUrl(url);
if (!string.IsNullOrWhiteSpace(footer))
eb.WithFooter(efb => efb.WithText(footer));
eb.WithFooter(footer);
return ch.SendMessageAsync("", embed: eb.Build());
}
@@ -38,7 +38,7 @@ namespace NadekoBot.Extensions
if (url != null && Uri.IsWellFormedUriString(url, UriKind.Absolute))
eb.WithUrl(url);
if (!string.IsNullOrWhiteSpace(footer))
eb.WithFooter(efb => efb.WithText(footer));
eb.WithFooter(footer);
return ch.SendMessageAsync("", embed: eb.Build());
}