Compare commits

..

No commits in common. "40cf3cff7ce3e17e04da24cb5ed148a85c7f4744" and "1a2be8f48aa12d7a35af998a5c557ddfad2da731" have entirely different histories.

View File

@ -33,22 +33,19 @@ async def inline_answer(client, inline_query):
results = []
applications = jsonLoad(f"{configGet('data', 'locations')}{sep}applications.json")
for match in list_of_users:
try:
user_data = jsonLoad(f"{configGet('data', 'locations')}{sep}users{sep}{match.user.id}.json")
application_content = []
i = 1
for question in applications[str(match.user.id)]["application"]:
for question in configGet("application", file=str(match.user.id)):
if i == 2:
age = relativedelta(datetime.now(), datetime.strptime(applications[str(match.user.id)]['application']['2'], '%d.%m.%Y'))
application_content.append(f"{locale('question'+str(i), 'message', 'question_titles')} {applications[str(match.user.id)]['application']['2']} ({age.years} р.)")
age = relativedelta(datetime.now(), datetime.strptime(configGet('application', file=str(match.user.id))['2'], '%d.%m.%Y'))
application_content.append(f"{locale('question'+str(i), 'message', 'question_titles')} {configGet('application', file=str(match.user.id))['2']} ({age.years} р.)")
else:
application_content.append(f"{locale('question'+str(i), 'message', 'question_titles')} {applications[str(match.user.id)]['application'][question]}")
application_content.append(f"{locale('question'+str(i), 'message', 'question_titles')} {configGet('application', file=str(match.user.id))[question]}")
i += 1
except KeyError:
continue
except FileNotFoundError:
continue
except TypeError: