mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Patron sytem should be *disabled* on selfhosted bots by default. Commited true by mistake.
This commit is contained in:
@@ -7,7 +7,7 @@ namespace NadekoBot.Modules.Utility.Patronage;
|
|||||||
public partial class PatronConfigData : ICloneable<PatronConfigData>
|
public partial class PatronConfigData : ICloneable<PatronConfigData>
|
||||||
{
|
{
|
||||||
[Comment("DO NOT CHANGE")]
|
[Comment("DO NOT CHANGE")]
|
||||||
public int Version { get; set; } = 1;
|
public int Version { get; set; } = 2;
|
||||||
|
|
||||||
[Comment("Whether the patronage feature is enabled")]
|
[Comment("Whether the patronage feature is enabled")]
|
||||||
public bool IsEnabled { get; set; }
|
public bool IsEnabled { get; set; }
|
||||||
|
@@ -18,5 +18,19 @@ public class PatronageConfig : ConfigServiceBase<PatronConfigData>
|
|||||||
x => x.IsEnabled,
|
x => x.IsEnabled,
|
||||||
bool.TryParse,
|
bool.TryParse,
|
||||||
ConfigPrinters.ToString);
|
ConfigPrinters.ToString);
|
||||||
|
|
||||||
|
Migrate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Migrate()
|
||||||
|
{
|
||||||
|
ModifyConfig(c =>
|
||||||
|
{
|
||||||
|
if (c.Version == 1)
|
||||||
|
{
|
||||||
|
c.Version = 2;
|
||||||
|
c.IsEnabled = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
# DO NOT CHANGE
|
# DO NOT CHANGE
|
||||||
version: 1
|
version: 2
|
||||||
# Whether the patronage feature is enabled
|
# Whether the patronage feature is enabled
|
||||||
isEnabled: true
|
isEnabled: false
|
||||||
# List of patron only features and relevant quota data
|
# List of patron only features and relevant quota data
|
||||||
quotas:
|
quotas:
|
||||||
# Dictionary of feature names with their respective limits. Set to null for unlimited
|
# Dictionary of feature names with their respective limits. Set to null for unlimited
|
||||||
|
Reference in New Issue
Block a user