mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05: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>
 | 
			
		||||
{
 | 
			
		||||
    [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; }
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user