This repository was archived by the owner on Apr 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,18 @@ def convert_post(post):
8484 , 'tt' : 'a16cbb5611d546e8f4f509f9cbdf98b5' # IDK what this is, but it doesn't seem to change. A hash maybe?
8585 }
8686
87+ def map_dict (a , f ):
88+ b = {}
89+ for kv in a .items ():
90+ k , v = f (* kv )
91+ b [k ] = v
92+ return b
93+
8794def make_roles_objects (plan_roles ):
88- return { k : discord .Object (v ) for k , v in plan_roles .items () }
95+ return map_dict (plan_roles , lambda k , v : (str (k ), discord .Object (int (v ))))
96+
97+ def str_values (d ):
98+ return map_dict (d , lambda k , v : (k , str (v )))
8999
90100def update_rate_limited (user_id , rate_limit , rate_limit_table ):
91101 now = time .time ()
@@ -126,6 +136,8 @@ def load_config(config_file):
126136 config .fallback_role = discord .Object (int (config .fallback_role ))
127137 config .all_roles = list (config .key_roles .values ()) + list (config .plan_roles .values ())
128138 config .cleanup = obj (config .cleanup )
139+ config .session_cookies = str_values (config .session_cookies )
140+ config .fantia_session_cookies = str_values (config .fantia_session_cookies )
129141 return config
130142
131143def load_registry ():
You can’t perform that action at this time.
0 commit comments