Automatically restart idling if it includes the appID that we've just blacklisted

This commit is contained in:
JustArchi
2020-04-11 18:56:12 +02:00
parent 876d275400
commit 1ab1cf1d6a

View File

@@ -1179,6 +1179,15 @@ namespace ArchiSteamFarm {
Bot.BotDatabase.AddIdlingBlacklistedAppIDs(appIDs);
if (Bot.CardsFarmer.NowFarming && Bot.CardsFarmer.GamesToFarmReadOnly.Any(game => appIDs.Contains(game.AppID))) {
Utilities.InBackground(
async () => {
await Bot.CardsFarmer.StopFarming().ConfigureAwait(false);
await Bot.CardsFarmer.StartFarming().ConfigureAwait(false);
}
);
}
return FormatBotResponse(Strings.Done);
}