all calls to .WithAuthor and .WithFooter no longer use their respective builders

This commit is contained in:
Kwoth
2021-07-08 02:54:55 +02:00
parent cbecd823c1
commit a17d0afc7d
12 changed files with 71 additions and 75 deletions

View File

@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Utility
if (string.IsNullOrWhiteSpace(features))
features = "-";
var embed = new EmbedBuilder()
.WithAuthor(eab => eab.WithName(GetText("server_info")))
.WithAuthor(GetText("server_info"))
.WithTitle(guild.Name)
.AddField(GetText("id"), guild.Id.ToString(), true)
.AddField(GetText("owner"), ownername.ToString(), true)
@@ -145,8 +145,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.EmbedAsync(new EmbedBuilder()
.WithTitle(GetText("activity_page", page + 1))
.WithOkColor()
.WithFooter(efb => efb.WithText(GetText("activity_users_total",
CmdHandler.UserMessagesSent.Count)))
.WithFooter(GetText("activity_users_total", CmdHandler.UserMessagesSent.Count))
.WithDescription(str.ToString())).ConfigureAwait(false);
}
}

View File

@@ -260,21 +260,23 @@ namespace NadekoBot.Modules.Utility
ownerIds = "-";
await ctx.Channel.EmbedAsync(
new EmbedBuilder().WithOkColor()
.WithAuthor(eab => eab.WithName($"NadekoBot v{StatsService.BotVersion}")
.WithUrl("http://nadekobot.readthedocs.io/en/latest/")
.WithIconUrl("https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/avatar.png"))
.AddField(GetText("author"), _stats.Author, true)
.AddField(GetText("botid"), _client.CurrentUser.Id.ToString(), true)
.AddField(GetText("shard"), $"#{_client.ShardId} / {_creds.TotalShards}", true)
.AddField(GetText("commands_ran"), _stats.CommandsRan.ToString(), true)
.AddField(GetText("messages"), $"{_stats.MessageCounter} ({_stats.MessagesPerSecond:F2}/sec)", true)
.AddField(GetText("memory"), $"{_stats.Heap} MB", true)
.AddField(GetText("owner_ids"), ownerIds, true)
.AddField(GetText("uptime"), _stats.GetUptimeString("\n"), true)
.AddField(efb => efb.WithName(GetText("presence")).WithValue(
GetText("presence_txt",
_coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))).ConfigureAwait(false);
new EmbedBuilder().WithOkColor()
.WithAuthor($"NadekoBot v{StatsService.BotVersion}",
"https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/avatar.png",
"https://nadekobot.readthedocs.io/en/latest/")
.AddField(GetText("author"), _stats.Author, true)
.AddField(GetText("botid"), _client.CurrentUser.Id.ToString(), true)
.AddField(GetText("shard"), $"#{_client.ShardId} / {_creds.TotalShards}", true)
.AddField(GetText("commands_ran"), _stats.CommandsRan.ToString(), true)
.AddField(GetText("messages"), $"{_stats.MessageCounter} ({_stats.MessagesPerSecond:F2}/sec)",
true)
.AddField(GetText("memory"), $"{_stats.Heap} MB", true)
.AddField(GetText("owner_ids"), ownerIds, true)
.AddField(GetText("uptime"), _stats.GetUptimeString("\n"), true)
.AddField(efb => efb.WithName(GetText("presence")).WithValue(
GetText("presence_txt",
_coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true)))
.ConfigureAwait(false);
}
[NadekoCommand, Aliases]