mirror of
https://github.com/RPCS3/discord-bot.git
synced 2024-11-23 10:19:39 +00:00
move warning for multi-pkg updates and make it more explicit
This commit is contained in:
parent
223ca4c6ae
commit
61f3e78baa
@ -135,9 +135,6 @@ internal sealed partial class Psn
|
||||
var sqvat = ctx.Client.GetEmoji(":sqvat:", Config.Reactions.No)!;
|
||||
await ctx.Message.ReactWithAsync(sqvat).ConfigureAwait(false);
|
||||
}
|
||||
if (embeds.Count > 1 || embeds[0].Fields.Count > 0)
|
||||
embeds[^1] = embeds.Last().WithFooter("Note that you need to install ALL listed updates, one by one");
|
||||
|
||||
var resultMsgBuilder = new DiscordMessageBuilder()
|
||||
.WithEmbed(embeds[0])
|
||||
.WithReply(ctx.Message.Id);
|
||||
|
@ -88,8 +88,7 @@ internal static class IsTheGamePlayableHandler
|
||||
if (!string.IsNullOrEmpty(info.Date))
|
||||
msg += $" since {info.ToUpdated()}";
|
||||
}
|
||||
msg +=
|
||||
$"\nfor more results please use compatibility list (<https://rpcs3.net/compatibility>) or `{Config.CommandPrefix}c` command in {botSpamChannel.Mention} (`!c {gameTitle.Sanitize()}`)";
|
||||
msg += $"\nfor more results please use compatibility list (<https://rpcs3.net/compatibility>) or `{Config.CommandPrefix}c` command in {botSpamChannel.Mention} (`!c {gameTitle.Sanitize()}`)";
|
||||
await args.Channel.SendMessageAsync(msg).ConfigureAwait(false);
|
||||
CooldownBuckets[args.Channel.Id] = DateTime.UtcNow;
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ internal static class TitlePatchFormatter
|
||||
var pages = pkgs.Length / EmbedPager.MaxFields + (pkgs.Length % EmbedPager.MaxFields == 0 ? 0 : 1);
|
||||
if (pages > 1)
|
||||
embedBuilder.Title = $"{title} [Part 1 of {pages}]".Trim(EmbedPager.MaxFieldTitleLength);
|
||||
var desc = $"Total download size of all {pkgs.Length} packages is {pkgs.Sum(p => p.Size).AsStorageUnit()}";
|
||||
if (patch?.OfflineCacheTimestamp is DateTime cacheTimestamp)
|
||||
desc = $"{desc}\n(Offline cache, last updated {(DateTime.UtcNow - cacheTimestamp).AsTimeDeltaDescription()} ago)";
|
||||
var desc = $"ℹ️ Total download size of all {pkgs.Length} packages is {pkgs.Sum(p => p.Size).AsStorageUnit()}.\n" +
|
||||
"\n" +
|
||||
"⚠️ You **must** install updates starting with the first. You **can not** install only the latest update.";
|
||||
embedBuilder.Description = desc;
|
||||
var i = 0;
|
||||
do
|
||||
@ -64,6 +64,8 @@ internal static class TitlePatchFormatter
|
||||
embedBuilder.Description = "No update information available";
|
||||
if (!result.Any() || embedBuilder.Fields.Any())
|
||||
result.Add(embedBuilder);
|
||||
if (patch?.OfflineCacheTimestamp is DateTime cacheTimestamp)
|
||||
result[^1].WithFooter($"Offline cache, last updated {(DateTime.UtcNow - cacheTimestamp).AsTimeDeltaDescription()} ago");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user