[+] thumb_url

pull/138/head
ZetGo | Aleksej K. 2025-05-24 02:21:04 +03:00
parent bff20410e7
commit 671fb43d88
5 changed files with 20 additions and 20 deletions

View File

@ -118,7 +118,7 @@ class Events(InlineUnit):
parse_mode="HTML",
disable_web_page_preview=True,
),
thumb_url=res.get("thumb"),
thumbnail_url=res.get("thumb"),
thumb_width=128,
thumb_height=128,
reply_markup=self.generate_markup(
@ -135,7 +135,7 @@ class Events(InlineUnit):
),
caption=self.sanitise_text(res.get("caption")),
parse_mode="HTML",
thumb_url=res.get("thumb", res["photo"]),
thumbnail_url=res.get("thumb", res["photo"]),
photo_url=res["photo"],
reply_markup=self.generate_markup(
res.get("reply_markup")
@ -148,7 +148,7 @@ class Events(InlineUnit):
title=self.sanitise_text(res.get("title")),
caption=self.sanitise_text(res.get("caption")),
parse_mode="HTML",
thumb_url=res.get("thumb", res["gif"]),
thumbnail_url=res.get("thumb", res["gif"]),
gif_url=res["gif"],
reply_markup=self.generate_markup(
res.get("reply_markup")
@ -166,7 +166,7 @@ class Events(InlineUnit):
res.get("caption")
),
parse_mode="HTML",
thumb_url=res.get("thumb", res["video"]),
thumbnail_url=res.get("thumb", res["video"]),
video_url=res["video"],
mime_type="video/mp4",
reply_markup=self.generate_markup(
@ -184,7 +184,7 @@ class Events(InlineUnit):
res.get("caption")
),
parse_mode="HTML",
thumb_url=res.get("thumb", res["file"]),
thumbnail_url=res.get("thumb", res["file"]),
document_url=res["file"],
mime_type=res["mime_type"],
reply_markup=self.generate_markup(
@ -427,7 +427,7 @@ class Events(InlineUnit):
parse_mode="HTML",
disable_web_page_preview=True,
),
thumb_url=thumb,
thumbnail_url=thumb,
thumb_width=128,
thumb_height=128,
reply_markup=self.generate_markup(
@ -456,7 +456,7 @@ class Events(InlineUnit):
parse_mode="HTML",
disable_web_page_preview=True,
),
thumb_url=(
thumbnail_url=(
"https://img.icons8.com/fluency/50/000000/info-squared.png"
),
thumb_width=128,
@ -484,7 +484,7 @@ class Events(InlineUnit):
parse_mode="HTML",
disable_web_page_preview=True,
),
thumb_url=(
thumbnail_url=(
"https://img.icons8.com/fluency/50/000000/info-squared.png"
),
thumb_width=128,

View File

@ -451,7 +451,7 @@ class Form(InlineUnit):
caption=form.get("text"),
parse_mode="HTML",
photo_url=form["photo"],
thumb_url=(
thumbnail_url=(
"https://img.icons8.com/cotton/452/moon-satellite.png"
),
reply_markup=self.generate_markup(
@ -470,7 +470,7 @@ class Form(InlineUnit):
caption=form.get("text"),
parse_mode="HTML",
gif_url=form["gif"],
thumb_url=(
thumbnail_url=(
"https://img.icons8.com/cotton/452/moon-satellite.png"
),
reply_markup=self.generate_markup(
@ -490,7 +490,7 @@ class Form(InlineUnit):
caption=form.get("text"),
parse_mode="HTML",
video_url=form["video"],
thumb_url=(
thumbnail_url=(
"https://img.icons8.com/cotton/452/moon-satellite.png"
),
mime_type="video/mp4",

View File

@ -680,7 +680,7 @@ class Gallery(InlineUnit):
ext = None
args = {
"thumb_url": "https://img.icons8.com/fluency/344/loading.png",
"thumbnail_url": "https://img.icons8.com/fluency/344/loading.png",
"caption": self._get_caption(unit["uid"], index=0),
"parse_mode": "HTML",
"reply_markup": self._gallery_markup(unit["uid"]),

View File

@ -147,7 +147,7 @@ class QueryGallery(InlineUnit):
parse_mode="HTML",
disable_web_page_preview=True,
),
thumb_url=photo_url,
thumbnail_url=photo_url,
thumb_width=128,
thumb_height=128,
)

View File

@ -220,7 +220,7 @@ class InlineQuery(AiogramInlineQuery):
)
@staticmethod
def _get_res(title: str, description: str, thumb_url: str) -> list:
def _get_res(title: str, description: str, thumbnail_url: str) -> list:
return [
InlineQueryResultArticle(
id=utils.rand(20),
@ -230,7 +230,7 @@ class InlineQuery(AiogramInlineQuery):
message_text="😶‍🌫️ <i>There is nothing here...</i>",
parse_mode="HTML",
),
thumb_url=thumb_url,
thumbnail_url=thumbnail_url,
thumb_width=128,
thumb_height=128,
)
@ -244,7 +244,7 @@ class InlineQuery(AiogramInlineQuery):
"Bad request. You need to pass right arguments, follow module's"
" documentation"
),
thumb_url="https://img.icons8.com/color/344/swearing-male--v1.png",
thumbnail_url="https://img.icons8.com/color/344/swearing-male--v1.png",
),
cache_time=0,
)
@ -254,7 +254,7 @@ class InlineQuery(AiogramInlineQuery):
self._get_res(
title="🚫 403",
description="You have no permissions to access this result",
thumb_url="https://img.icons8.com/external-wanicon-flat-wanicon/344/external-forbidden-new-normal-wanicon-flat-wanicon.png",
thumbnail_url="https://img.icons8.com/external-wanicon-flat-wanicon/344/external-forbidden-new-normal-wanicon-flat-wanicon.png",
),
cache_time=0,
)
@ -264,7 +264,7 @@ class InlineQuery(AiogramInlineQuery):
self._get_res(
title="🚫 404",
description="No results found",
thumb_url="https://img.icons8.com/external-justicon-flat-justicon/344/external-404-error-responsive-web-design-justicon-flat-justicon.png",
thumbnail_url="https://img.icons8.com/external-justicon-flat-justicon/344/external-404-error-responsive-web-design-justicon-flat-justicon.png",
),
cache_time=0,
)
@ -274,7 +274,7 @@ class InlineQuery(AiogramInlineQuery):
self._get_res(
title="🚫 426",
description="You need to update Heroku before sending this request",
thumb_url="https://img.icons8.com/fluency/344/approve-and-update.png",
thumbnail_url="https://img.icons8.com/fluency/344/approve-and-update.png",
),
cache_time=0,
)
@ -284,7 +284,7 @@ class InlineQuery(AiogramInlineQuery):
self._get_res(
title="🚫 500",
description="Internal userbot error while processing request. More info in logs",
thumb_url="https://img.icons8.com/external-vitaliy-gorbachev-flat-vitaly-gorbachev/344/external-error-internet-security-vitaliy-gorbachev-flat-vitaly-gorbachev.png",
thumbnail_url="https://img.icons8.com/external-vitaliy-gorbachev-flat-vitaly-gorbachev/344/external-error-internet-security-vitaliy-gorbachev-flat-vitaly-gorbachev.png",
),
cache_time=0,
)