Removed litter

This commit is contained in:
Profitroll 2022-10-27 11:41:49 +02:00
parent 7019a1ffde
commit a867c4f4b7

View File

@ -31,10 +31,6 @@ async def inline_answer(client, inline_query):
async for m in app.get_chat_members(configGet("admin_group"), filter=ChatMembersFilter.SEARCH, query=inline_query.query): async for m in app.get_chat_members(configGet("admin_group"), filter=ChatMembersFilter.SEARCH, query=inline_query.query):
list_of_users.append(m) list_of_users.append(m)
#list_of_names = []
#list_filtered = [v for v in (list_of_users) if inline_query.query in v]
results = [] results = []
for match in list_of_users: for match in list_of_users:
@ -65,9 +61,7 @@ async def inline_answer(client, inline_query):
locale("message_content", "inline", "user").format(match.user.first_name, match.user.username, "\n".join(application_content)) locale("message_content", "inline", "user").format(match.user.first_name, match.user.username, "\n".join(application_content))
), ),
description=locale("description", "inline", "user").format(match.user.first_name, match.user.username), description=locale("description", "inline", "user").format(match.user.first_name, match.user.username),
thumb_url=f'{configGet("api")}/?avatar_id={match.user.photo.big_file_id}', thumb_url=f'{configGet("api")}/?avatar_id={match.user.photo.big_file_id}'
# thumb_height=640,
# thumb_width=640
) )
) )
print(f'{configGet("api")}/?avatar_id={match.user.photo.big_file_id}', flush=True) print(f'{configGet("api")}/?avatar_id={match.user.photo.big_file_id}', flush=True)
@ -91,64 +85,12 @@ async def inline_answer(client, inline_query):
description=locale("description", "inline", "user").format(match.user.first_name, match.user.username) description=locale("description", "inline", "user").format(match.user.first_name, match.user.username)
) )
) )
# if match.user.photo != None:
# results.append(
# InlineQueryResultArticle(
# title=str(match.user.first_name),
# input_message_content=InputTextMessageContent(
# f"More about @{match.user.username}"
# ),
# description=f"More info about {match.user.username}",
# thumb_url=f'https://api.telegram.org/bot{configGet("bot_token", "bot")}/{match.user.photo.big_file_id}',
# thumb_height=640,
# thumb_width=640
# )
# )
# else:
await inline_query.answer( await inline_query.answer(
results=results, results=results,
cache_time=10 cache_time=10
) )
# await inline_query.answer(
# results=[
# InlineQueryResultArticle(
# title="Installation",
# input_message_content=InputTextMessageContent(
# "Here's how to install **Pyrogram**"
# ),
# url="https://docs.pyrogram.org/intro/install",
# description="How to install Pyrogram",
# reply_markup=InlineKeyboardMarkup(
# [
# [InlineKeyboardButton(
# "Open website",
# url="https://docs.pyrogram.org/intro/install"
# )]
# ]
# )
# ),
# InlineQueryResultArticle(
# title="Usage",
# input_message_content=InputTextMessageContent(
# "Here's how to use **Pyrogram**"
# ),
# url="https://docs.pyrogram.org/start/invoking",
# description="How to use Pyrogram",
# reply_markup=InlineKeyboardMarkup(
# [
# [InlineKeyboardButton(
# "Open website",
# url="https://docs.pyrogram.org/start/invoking"
# )]
# ]
# )
# )
# ],
# cache_time=1
# )
else: else:
await inline_query.answer( await inline_query.answer(
results=[ results=[