mirror of https://github.com/coddrago/Heroku
[-] rollback.
parent
73f6b221e3
commit
bbbe010c8b
|
@ -64,7 +64,7 @@ class Events(InlineUnit):
|
|||
func=self._allmodules.inline_handlers[cmd],
|
||||
user=inline_query.from_user.id,
|
||||
):
|
||||
instance = InlineQuery(inline_query=inline_query)
|
||||
instance = InlineQuery(inline_query)
|
||||
|
||||
try:
|
||||
if not (
|
||||
|
|
|
@ -382,7 +382,7 @@ class Form(InlineUnit):
|
|||
|
||||
inline_message_id = self._units[unit_id]["inline_message_id"]
|
||||
|
||||
msg = InlineMessage(inline_manager=self, unit_id=unit_id, inline_message_id=inline_message_id)
|
||||
msg = InlineMessage(self, unit_id, inline_message_id)
|
||||
|
||||
if not isinstance(base_reply_markup, Placeholder):
|
||||
await msg.edit(text, reply_markup=base_reply_markup)
|
||||
|
|
|
@ -119,7 +119,7 @@ class Gallery(InlineUnit):
|
|||
return False
|
||||
|
||||
if isinstance(caption, list):
|
||||
caption = ListGalleryHelper(lst=caption)
|
||||
caption = ListGalleryHelper(caption)
|
||||
|
||||
if not isinstance(manual_security, bool):
|
||||
logger.error(
|
||||
|
@ -187,7 +187,7 @@ class Gallery(InlineUnit):
|
|||
|
||||
if isinstance(next_handler, list):
|
||||
if all(isinstance(i, str) for i in next_handler):
|
||||
next_handler = ListGalleryHelper(lst=next_handler)
|
||||
next_handler = ListGalleryHelper(next_handler)
|
||||
else:
|
||||
logger.error(
|
||||
(
|
||||
|
|
|
@ -425,16 +425,16 @@ class Utils(InlineUnit):
|
|||
media.name = "upload.mp4"
|
||||
|
||||
if isinstance(media, io.BytesIO):
|
||||
media = InputFile(filename=media)
|
||||
media = InputFile(media)
|
||||
|
||||
if file:
|
||||
media = InputMediaDocument(media=media, caption=text, parse_mode="HTML")
|
||||
media = InputMediaDocument(media, caption=text, parse_mode="HTML")
|
||||
elif photo:
|
||||
media = InputMediaPhoto(media=media, caption=text, parse_mode="HTML")
|
||||
media = InputMediaPhoto(media, caption=text, parse_mode="HTML")
|
||||
elif audio:
|
||||
if isinstance(audio, dict):
|
||||
media = InputMediaAudio(
|
||||
media=audio["url"],
|
||||
audio["url"],
|
||||
title=audio.get("title"),
|
||||
performer=audio.get("performer"),
|
||||
duration=audio.get("duration"),
|
||||
|
@ -443,14 +443,14 @@ class Utils(InlineUnit):
|
|||
)
|
||||
else:
|
||||
media = InputMediaAudio(
|
||||
media=audio,
|
||||
audio,
|
||||
caption=text,
|
||||
parse_mode="HTML",
|
||||
)
|
||||
elif video:
|
||||
media = InputMediaVideo(media=media, caption=text, parse_mode="HTML")
|
||||
media = InputMediaVideo(media, caption=text, parse_mode="HTML")
|
||||
elif gif:
|
||||
media = InputMediaAnimation(media=media, caption=text, parse_mode="HTML")
|
||||
media = InputMediaAnimation(media, caption=text, parse_mode="HTML")
|
||||
|
||||
if media is None and text is None and reply_markup:
|
||||
try:
|
||||
|
|
|
@ -395,7 +395,7 @@ class TelegramLogsHandler(logging.Handler):
|
|||
|
||||
for exceptions in self._exc_queue.values():
|
||||
for exc in exceptions:
|
||||
asyncio.create_task(exc)
|
||||
await exc
|
||||
|
||||
self.tg_buff = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue