All .AddField calls no longer use builder

- Cleaned up convertlist and listserver embeds slightly
This commit is contained in:
Kwoth
2021-07-08 20:01:42 +02:00
parent a17d0afc7d
commit 5b4daa9dd3
20 changed files with 116 additions and 147 deletions

View File

@@ -87,8 +87,8 @@ namespace NadekoBot.Modules.Games.Common.Trivia
{
questionEmbed = new EmbedBuilder().WithOkColor()
.WithTitle(GetText("trivia_game"))
.AddField(eab => eab.WithName(GetText("category")).WithValue(CurrentQuestion.Category))
.AddField(eab => eab.WithName(GetText("question")).WithValue(CurrentQuestion.Question));
.AddField(GetText("category"), CurrentQuestion.Category)
.AddField(GetText("question"), CurrentQuestion.Question);
if (showHowToQuit)
questionEmbed.WithFooter(GetText("trivia_quit", _quitCommand));

View File

@@ -157,15 +157,11 @@ namespace NadekoBot.Modules.Games.Common
var wpm = CurrentSentence.Length / WORD_VALUE / elapsed.TotalSeconds * 60;
finishedUserIds.Add(msg.Author.Id);
await this.Channel.EmbedAsync(new EmbedBuilder().WithOkColor()
.WithTitle($"{msg.Author} finished the race!")
.AddField(efb =>
efb.WithName("Place").WithValue($"#{finishedUserIds.Count}").WithIsInline(true))
.AddField(efb =>
efb.WithName("WPM").WithValue($"{wpm:F1} *[{elapsed.TotalSeconds:F2}sec]*")
.WithIsInline(true))
.AddField(efb =>
efb.WithName("Errors").WithValue(distance.ToString()).WithIsInline(true)))
.ConfigureAwait(false);
.WithTitle($"{msg.Author} finished the race!")
.AddField("Place", $"#{finishedUserIds.Count}", true)
.AddField("WPM", $"{wpm:F1} *[{elapsed.TotalSeconds:F2}sec]*", true)
.AddField("Errors", distance.ToString(), true));
if (finishedUserIds.Count % 4 == 0)
{
await this.Channel.SendConfirmAsync(

View File

@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Games
{
var loseEmbed = new EmbedBuilder().WithTitle($"Hangman Game ({game.TermType}) - Ended")
.WithDescription(Format.Bold("You lose."))
.AddField(efb => efb.WithName("It was").WithValue(game.Term.GetWord()))
.AddField("It was", game.Term.GetWord())
.WithFooter(string.Join(" ", game.PreviousGuesses))
.WithErrorColor();
@@ -101,7 +101,7 @@ namespace NadekoBot.Modules.Games
var winEmbed = new EmbedBuilder().WithTitle($"Hangman Game ({game.TermType}) - Ended")
.WithDescription(Format.Bold($"{winner} Won."))
.AddField(efb => efb.WithName("It was").WithValue(game.Term.GetWord()))
.AddField("It was", game.Term.GetWord())
.WithFooter(string.Join(" ", game.PreviousGuesses))
.WithOkColor();