diff --git a/README.md b/README.md
index 1709805..4e90961 100755
--- a/README.md
+++ b/README.md
@@ -1,45 +1,93 @@
-
+
Installation
+
-[](https://cloud.okteto.com/#/deploy?repository=https://github.com/hikariatama/Hikka)
+
-## Changes
+
+
Changes
-- 🆕 Latest Telegram Layers with reactions, video stickers and other stuff
-- 🔓 Security improvements
-- 🎨 UI/UX improvements
-- 📼 New core modules
-- ☁️ Okteto cloud deployment support
-- ⏱ Quick bug fixes (compared to official FTG)
-- ▶️ Inline Buttons, available not only for core modules, but for every developer
-- 🖼 Inline Galleries for every developer
-- 🔁 Full backward compatibility with older version and with official FTG\GeekTG modules
+
+ - 🆕 Latest Telegram Layers with reactions, video stickers and other stuff
+ - 🔓 Security improvements
+ - 🎨 UI/UX improvements
+ - 📼 New core modules
+ - ☁️ Okteto cloud deployment support
+ - ⏱ Quick bug fixes (compared to official FTG)
+ - ▶️ Inline Buttons, available not only for core modules, but for every developer
+ - 🖼 Inline Galleries for every developer
+ - 🔁 Full backward compatibility with older version and with official FTG\GeekTG modules
+
+
+
Requirements
+
+ - Python 3.8 or above
+ - Requirements from
requirements.txt
+ - Optional: API ID and Hash from Telegram or default ones, if your Telegram account is old enough
+ - Optional: Some basic knowledge of terminal
+
+
+
Documentation
----
-
-
-## Last but not the least
-
-### InlineLogs - traceback directly in message, caused error
-
----
-### Grep - execute command and get only required lines
-
----
-### NoNick, NoNickUser, NoNickCmd - enable global nonickname feature
-
----
-### Requirements
-
-- Python 3.8 or above
-- Requirements from `requirements.txt`
-- Optional: API ID and Hash from [Telegram](https://my.telegram.org/apps) or default ones, if your Telegram account is old enough
-- Optional: Some basic knowledge of terminal
-
-### Documentation
-
-Check out the folder `docs` for developers' documentation
+Check out the folder docs
for developers' documentation
User docs will be available soon
+
+
+
+
Features
+
+
+
+ Forms - bored of writing? Use buttons!
+ |
+
+ Galleries - scroll your favorite photos in Telegram
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+ Inline - share userbot with your friends
+ |
+
+ Bot interactions - "No PM"? No problem. Feedback bot at your service
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+ InlineLogs - traceback directly in message, caused error
+ |
+
+ Grep - execute command and get only required lines
+ |
+
+
+
+
+ |
+
+
+ |
+
+
-### Support
-
-[Support Group](https://t.me/hikka_talks "Telegram").
+👨👦 NoNick, NoNickUser, NoNickCmd - use another account for userbot
+
diff --git a/hikka/inline/gallery.py b/hikka/inline/gallery.py
index 6def797..c61e827 100644
--- a/hikka/inline/gallery.py
+++ b/hikka/inline/gallery.py
@@ -195,6 +195,9 @@ class Gallery(InlineUnit):
"force_me": force_me,
}
+ if isinstance(message, Message):
+ await (message.edit if message.out else message.respond)("👩🎤 Loading inline gallery...")
+
try:
q = await self._client.inline_query(self.bot_username, gallery_uid)
m = await q[0].click(
@@ -237,7 +240,7 @@ class Gallery(InlineUnit):
self._galleries[gallery_uid]["chat"] = utils.get_chat_id(m)
self._galleries[gallery_uid]["message_id"] = m.id
- if isinstance(message, Message) and message.out:
+ if isinstance(message, Message):
await message.delete()
asyncio.ensure_future(self._load_gallery_photos(gallery_uid))
@@ -297,7 +300,8 @@ class Gallery(InlineUnit):
)
except RetryAfter as e:
await call.answer(
- f"Got FloodWait. Wait for {e.timeout} seconds", show_alert=True
+ f"Got FloodWait. Wait for {e.timeout} seconds",
+ show_alert=True,
)
except Exception:
logger.exception("Exception while trying to edit media")
@@ -398,9 +402,13 @@ class Gallery(InlineUnit):
def _get_next_photo(self, gallery_uid: str) -> str:
"""Returns next photo"""
- return self._galleries[gallery_uid]["photos"][
- self._galleries[gallery_uid]["current_index"]
- ]
+ try:
+ return self._galleries[gallery_uid]["photos"][
+ self._galleries[gallery_uid]["current_index"]
+ ]
+ except IndexError:
+ logger.error(f"Got IndexError in `_get_next_photo`. {self._galleries[gallery_uid]['current_index']=} / {len(self._galleries[gallery_uid]['photos'])=}")
+ return self._galleries[gallery_uid]["photos"][0]
def _get_caption(self, gallery_uid: str) -> str:
"""Calls and returnes caption for gallery"""