import file_manager import firebase_manager db = firebase_manager.firestore_database users = firebase_manager.auth.list_users().users def create_properties_collection(uid, name): """Create properties collection for a specific server of a user.""" properties = { "difficulty": "easy", "gamemode": "survival", "force-gamemode": False, "hardcore": False, "generate-structures": True, "motd": "A Minecraft Server", "pvp": True, "online-mode": True, "max-players": 20, "enable-command-block": False } doc_ref = db.document(f'users/{uid}/servers/{name}') #doc_ref.set(properties) doc_ref.delete() def get_servers(uid): servers_ref = db.collection(f'users/{uid}/servers').stream() servers_names = [doc.id for doc in servers_ref] return servers_names if __name__ == 'voituredecourse': for user in users: user_id = user.uid servers = get_servers(user_id) for server_id in servers: create_properties_collection(user_id, server_id) if __name__ == '__main__': print(file_manager.kebab_to_camel_case("enable-command-block"))