[PyroFork] Fix Some Pyromod Method

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
Yasir Aris M 2023-12-23 00:25:45 +00:00 committed by wulan17
parent 57f7a23dd5
commit 83f39f6ac3
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
2 changed files with 3 additions and 4 deletions

View file

@ -83,7 +83,7 @@ class Ask:
await app.ask(chat_id, "Tell me your name:")
"""
sent_message = None
if text.strip() != "":
if text and isinstance(text, str):
chat_to_ask = chat_id[0] if isinstance(chat_id, list) else chat_id
sent_message = await self.send_message(chat_to_ask, text, *args, **kwargs)

View file

@ -579,10 +579,9 @@ class Message(Object, Update):
message_id = getattr(self, "id", getattr(self, "message_id", None))
return await self._client.listen(
(self.chat.id, from_user_id, self.id),
listener_type=pyrogram.enums.ListenerTypes.CALLBACK_QUERY,
timeout=timeout,
filters=filters,
timeout=timeout,
listener_type=pyrogram.enums.ListenerTypes.CALLBACK_QUERY,
unallowed_click_alert=alert,
chat_id=self.chat.id,
user_id=from_user_id,