mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
State count of handled confirmations in 2fa commands
This commit is contained in:
@@ -106,7 +106,7 @@ namespace ArchiSteamFarm {
|
||||
if ((acceptedTradeOfferIDs == null) || (acceptedTradeOfferIDs.Count == 0)) {
|
||||
bool result = await Bot.BotDatabase.MobileAuthenticator.HandleConfirmations(confirmations, accept).ConfigureAwait(false);
|
||||
|
||||
return (result, result ? Strings.Success : Strings.WarningFailed);
|
||||
return (result, result ? string.Format(Strings.BotHandledConfirmations, confirmations.Count) : Strings.WarningFailed);
|
||||
}
|
||||
|
||||
IList<Steam.ConfirmationDetails> results = await Utilities.InParallel(confirmations.Select(Bot.BotDatabase.MobileAuthenticator.GetConfirmationDetails)).ConfigureAwait(false);
|
||||
@@ -133,11 +133,11 @@ namespace ArchiSteamFarm {
|
||||
|
||||
// Check if those are all that we were expected to confirm
|
||||
if (acceptedTradeOfferIDs.All(handledTradeOfferIDs.Contains)) {
|
||||
return (true, Strings.Success);
|
||||
return (true, string.Format(Strings.BotHandledConfirmations, acceptedTradeOfferIDs.Count));
|
||||
}
|
||||
}
|
||||
|
||||
return (!waitIfNeeded, waitIfNeeded ? Strings.Success : string.Format(Strings.ErrorRequestFailedTooManyTimes, WebBrowser.MaxTries));
|
||||
return (!waitIfNeeded, !waitIfNeeded ? Strings.Success : string.Format(Strings.ErrorRequestFailedTooManyTimes, WebBrowser.MaxTries));
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
|
||||
9
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
9
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
@@ -321,6 +321,15 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Successfully handled {0} confirmations..
|
||||
/// </summary>
|
||||
public static string BotHandledConfirmations {
|
||||
get {
|
||||
return ResourceManager.GetString("BotHandledConfirmations", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Bot has no wallet..
|
||||
/// </summary>
|
||||
|
||||
@@ -720,4 +720,8 @@ StackTrace:
|
||||
<data name="ErrorSingleInstanceRequired" xml:space="preserve">
|
||||
<value>ASF process is already running for this working directory, aborting!</value>
|
||||
</data>
|
||||
<data name="BotHandledConfirmations" xml:space="preserve">
|
||||
<value>Successfully handled {0} confirmations.</value>
|
||||
<comment>{0} will be replaced by number of confirmations</comment>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user