Don't warn about failing to load server settings when the file isn't found

This commit is contained in:
Michail
2024-02-28 21:01:08 +01:00
parent e595de2033
commit 2d4f2671c9

View File

@@ -57,8 +57,10 @@ public class SettingsManager implements GuildSettingsManager<Settings>
o.has("prefix") ? o.getString("prefix") : null, o.has("prefix") ? o.getString("prefix") : null,
o.has("skip_ratio") ? o.getDouble("skip_ratio") : SKIP_RATIO)); o.has("skip_ratio") ? o.getDouble("skip_ratio") : SKIP_RATIO));
}); });
} catch (NoSuchFileException e) {
// ignore, it just means no settings have been saved yet
} catch(IOException | JSONException e) { } catch(IOException | JSONException e) {
LoggerFactory.getLogger("Settings").warn("Failed to load server settings (this is normal if no settings have been set yet): "+e); LoggerFactory.getLogger("Settings").warn("Failed to load server settings: "+e);
} }
} }