@@ -7,20 +7,24 @@ class ConfigManager:
77 """Class that manages a cached configuration"""
88
99 allowed_to_change_in_command = {
10- 'activity_message' , 'activity_type' , 'log_channel_id' , 'mention' , 'disable_autoupdates' , 'prefix' ,
11- 'main_category_id' , 'sent_emoji' , 'blocked_emoji' , 'thread_creation_response' , 'twitch_url'
10+ 'activity_message' , 'activity_type' , 'log_channel_id' ,
11+ 'mention' , 'disable_autoupdates' , 'prefix' ,
12+ 'main_category_id' , 'sent_emoji' , 'blocked_emoji' ,
13+ 'thread_creation_response' , 'twitch_url'
1214 }
1315
1416 internal_keys = {
15- 'snippets' , 'aliases' , 'blocked' , 'notification_squad' , 'subscriptions'
17+ 'snippets' , 'aliases' , 'blocked' ,
18+ 'notification_squad' , 'subscriptions' ,
19+ 'closures'
1620 }
1721
1822 protected_keys = {
1923 'token' , 'owners' , 'modmail_api_token' , 'guild_id' , 'modmail_guild_id' ,
2024 'mongo_uri' , 'github_access_token' , 'log_url'
2125 }
2226
23- valid_keys = allowed_to_change_in_command . union ( internal_keys ). union ( protected_keys )
27+ valid_keys = allowed_to_change_in_command | internal_keys | protected_keys
2428
2529 def __init__ (self , bot ):
2630 self .bot = bot
@@ -38,7 +42,8 @@ def populate_cache(self):
3842 'aliases' : {},
3943 'blocked' : {},
4044 'notification_squad' : {},
41- 'subscriptions' : {}
45+ 'subscriptions' : {},
46+ 'closures' : {},
4247 }
4348
4449 try :
@@ -47,7 +52,8 @@ def populate_cache(self):
4752 pass
4853 finally :
4954 data .update (os .environ )
50- data = {k .lower (): v for k , v in data .items () if k .lower () in self .valid_keys }
55+ data = {k .lower (): v for k , v in data .items ()
56+ if k .lower () in self .valid_keys }
5157 self .cache = data
5258
5359 async def update (self , data = None ):
0 commit comments