def export_save(data_player, data_kick, guild_id, save_name=""): if save_name: save_name = "_" + save_name print(" - Partie enregistr¨Ĥe -") with open(f"saves/save{save_name}.json", "w") as file: file.write(json.dumps( { "players": [data_player[player_id].export() for player_id in data_player], "kicks": data_kick, "guild_id": guild_id }, indent=4))