Patron sytem should be *disabled* on selfhosted bots by default. Commited true by mistake.

This commit is contained in:
Kwoth
2022-06-22 09:55:09 +02:00
parent 9f445c0866
commit 14bfcb54dc
3 changed files with 17 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ namespace NadekoBot.Modules.Utility.Patronage;
public partial class PatronConfigData : ICloneable<PatronConfigData>
{
[Comment("DO NOT CHANGE")]
public int Version { get; set; } = 1;
public int Version { get; set; } = 2;
[Comment("Whether the patronage feature is enabled")]
public bool IsEnabled { get; set; }

View File

@@ -18,5 +18,19 @@ public class PatronageConfig : ConfigServiceBase<PatronConfigData>
x => x.IsEnabled,
bool.TryParse,
ConfigPrinters.ToString);
Migrate();
}
private void Migrate()
{
ModifyConfig(c =>
{
if (c.Version == 1)
{
c.Version = 2;
c.IsEnabled = false;
}
});
}
}

View File

@@ -1,7 +1,7 @@
# DO NOT CHANGE
version: 1
version: 2
# Whether the patronage feature is enabled
isEnabled: true
isEnabled: false
# List of patron only features and relevant quota data
quotas:
# Dictionary of feature names with their respective limits. Set to null for unlimited