From 671fb43d88c6bbb3c2e73f5539f750fcc7a77e8f Mon Sep 17 00:00:00 2001 From: "ZetGo | Aleksej K." <73279716+ZetGoHack@users.noreply.github.com> Date: Sat, 24 May 2025 02:21:04 +0300 Subject: [PATCH] [+] thumb_url --- heroku/inline/events.py | 16 ++++++++-------- heroku/inline/form.py | 6 +++--- heroku/inline/gallery.py | 2 +- heroku/inline/query_gallery.py | 2 +- heroku/inline/types.py | 14 +++++++------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/heroku/inline/events.py b/heroku/inline/events.py index a72180b..c8cdf3a 100644 --- a/heroku/inline/events.py +++ b/heroku/inline/events.py @@ -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, diff --git a/heroku/inline/form.py b/heroku/inline/form.py index 5eff040..7262fdd 100644 --- a/heroku/inline/form.py +++ b/heroku/inline/form.py @@ -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", diff --git a/heroku/inline/gallery.py b/heroku/inline/gallery.py index e80a427..9eeafc9 100644 --- a/heroku/inline/gallery.py +++ b/heroku/inline/gallery.py @@ -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"]), diff --git a/heroku/inline/query_gallery.py b/heroku/inline/query_gallery.py index 2244749..68a0965 100644 --- a/heroku/inline/query_gallery.py +++ b/heroku/inline/query_gallery.py @@ -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, ) diff --git a/heroku/inline/types.py b/heroku/inline/types.py index c89f27d..15efc7e 100644 --- a/heroku/inline/types.py +++ b/heroku/inline/types.py @@ -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="πŸ˜Άβ€πŸŒ«οΈ There is nothing here...", 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, )