mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Include more helpful output for Play() Bot action
This commit is contained in:
@@ -221,7 +221,7 @@ namespace ArchiSteamFarm.Steam.Interaction {
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public async Task<(bool Success, string Message)> Play(IEnumerable<uint> gameIDs, string? gameName = null) {
|
||||
public async Task<(bool Success, string Message)> Play(IReadOnlyCollection<uint> gameIDs, string? gameName = null) {
|
||||
if (gameIDs == null) {
|
||||
throw new ArgumentNullException(nameof(gameIDs));
|
||||
}
|
||||
@@ -236,7 +236,7 @@ namespace ArchiSteamFarm.Steam.Interaction {
|
||||
|
||||
await Bot.ArchiHandler.PlayGames(gameIDs, gameName).ConfigureAwait(false);
|
||||
|
||||
return (true, Strings.Done);
|
||||
return (true, gameIDs.Count > 0 ? string.Format(CultureInfo.CurrentCulture, Strings.BotIdlingSelectedGames, nameof(gameIDs), string.Join(", ", gameIDs)) : Strings.Done);
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
|
||||
@@ -2888,7 +2888,7 @@ namespace ArchiSteamFarm.Steam.Interaction {
|
||||
return FormatBotResponse(Strings.BotNotConnected);
|
||||
}
|
||||
|
||||
(bool success, string message) = await Bot.Actions.Play(Enumerable.Empty<uint>(), Bot.BotConfig.CustomGamePlayedWhileIdle).ConfigureAwait(false);
|
||||
(bool success, string message) = await Bot.Actions.Play(Array.Empty<uint>(), Bot.BotConfig.CustomGamePlayedWhileIdle).ConfigureAwait(false);
|
||||
|
||||
return FormatBotResponse(success ? message : string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user