Changed max number of results

This commit is contained in:
Profitroll 2022-12-17 23:12:15 +01:00
parent 43ce2d73b6
commit 1d5ebd02fe

View File

@ -44,8 +44,10 @@ async def inline_answer(client, inline_query):
if holo_user.application_approved() or (await isAnAdmin(holo_user.id) is True):
max_results = configGet("inline_preview_count") if inline_query.query is not "" else 200
list_of_users = []
async for m in app.get_chat_members(configGet("destination_group"), limit=configGet("inline_preview_count"), filter=ChatMembersFilter.SEARCH, query=inline_query.query):
async for m in app.get_chat_members(configGet("destination_group"), limit=max_results, filter=ChatMembersFilter.SEARCH, query=inline_query.query):
list_of_users.append(m)
results = []