This commit is contained in:
Łukasz Domeradzki
2024-05-03 15:18:17 +02:00
parent ab9ca4b9c3
commit 0f6a3f2ec8
2 changed files with 3 additions and 3 deletions

View File

@@ -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));

View File

@@ -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)) {