mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
This commit is contained in:
@@ -1536,7 +1536,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
|
||||
throw new InvalidOperationException(nameof(configFile));
|
||||
}
|
||||
|
||||
(BotConfig? botConfig, _) = await BotConfig.Load(configFile, BotName).ConfigureAwait(false);
|
||||
(BotConfig? botConfig, _) = await BotConfig.Load(configFile).ConfigureAwait(false);
|
||||
|
||||
if (botConfig == null) {
|
||||
// Invalid config file, we allow user to fix it without destroying the bot right away
|
||||
@@ -1684,7 +1684,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
|
||||
return;
|
||||
}
|
||||
|
||||
(BotConfig? botConfig, string? latestJson) = await BotConfig.Load(configFilePath, botName).ConfigureAwait(false);
|
||||
(BotConfig? botConfig, string? latestJson) = await BotConfig.Load(configFilePath).ConfigureAwait(false);
|
||||
|
||||
if (botConfig == null) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorBotConfigInvalid, configFilePath));
|
||||
|
||||
@@ -520,7 +520,7 @@ public sealed class BotConfig {
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static async Task<(BotConfig? BotConfig, string? LatestJson)> Load(string filePath, string? botName = null) {
|
||||
internal static async Task<(BotConfig? BotConfig, string? LatestJson)> Load(string filePath) {
|
||||
ArgumentException.ThrowIfNullOrEmpty(filePath);
|
||||
|
||||
if (!File.Exists(filePath)) {
|
||||
|
||||
Reference in New Issue
Block a user