mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-15 01:17:37 +00:00
Enhance !statusall
This commit is contained in:
parent
a261dc44fd
commit
3c5bea6850
1 changed files with 5 additions and 11 deletions
|
@ -852,18 +852,12 @@ namespace ArchiSteamFarm {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder result = new StringBuilder(Environment.NewLine);
|
HashSet<Bot> botsRunning = new HashSet<Bot>(Bots.Where(bot => bot.Value.KeepRunning).OrderBy(bot => bot.Key).Select(bot => bot.Value));
|
||||||
|
IEnumerable<string> statuses = botsRunning.Select(bot => bot.ResponseStatus(steamID));
|
||||||
|
|
||||||
byte runningBotsCount = 0;
|
return Environment.NewLine +
|
||||||
foreach (Bot bot in Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value)) {
|
string.Join(Environment.NewLine, statuses) + Environment.NewLine +
|
||||||
result.Append(bot.ResponseStatus(steamID) + Environment.NewLine);
|
"There are " + botsRunning.Count + "/" + Bots.Count + " bots running, with total of " + botsRunning.Sum(bot => bot.CardsFarmer.GamesToFarm.Count) + " games (" + botsRunning.Sum(bot => bot.CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining)) + " cards) left to farm.";
|
||||||
if (bot.KeepRunning) {
|
|
||||||
runningBotsCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result.Append("There are " + runningBotsCount + "/" + Bots.Count + " bots running.");
|
|
||||||
return result.ToString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string> ResponseLoot(ulong steamID) {
|
private async Task<string> ResponseLoot(ulong steamID) {
|
||||||
|
|
Loading…
Reference in a new issue