Added support for new avatars API
This commit is contained in:
parent
1d14fd014b
commit
4961d6ba79
@ -202,7 +202,7 @@ async def inline_answer(client: Client, inline_query: InlineQuery):
|
|||||||
f'{configGet("cache", "locations")}{sep}avatars{sep}{match.user.photo.big_file_id}'
|
f'{configGet("cache", "locations")}{sep}avatars{sep}{match.user.photo.big_file_id}'
|
||||||
):
|
):
|
||||||
print(
|
print(
|
||||||
f'Downloaded avatar {match.user.photo.big_file_id} of {match.user.id} and uploaded to {configGet("api")}/?avatar_id={match.user.photo.big_file_id}',
|
f'Downloaded avatar {match.user.photo.big_file_id} of {match.user.id} and uploaded to {configGet("api")}/avatars/{match.user.photo.big_file_id}',
|
||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
await app.download_media(
|
await app.download_media(
|
||||||
@ -230,7 +230,7 @@ async def inline_answer(client: Client, inline_query: InlineQuery):
|
|||||||
"user",
|
"user",
|
||||||
locale=inline_query.from_user,
|
locale=inline_query.from_user,
|
||||||
).format(match.user.first_name, match.user.username),
|
).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")}/avatars/{match.user.photo.big_file_id}',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Reference in New Issue
Block a user