diff --git a/pyromod/listen/client.py b/pyromod/listen/client.py index 073a04b..735f69e 100644 --- a/pyromod/listen/client.py +++ b/pyromod/listen/client.py @@ -89,7 +89,7 @@ async def ask( **kwargs, ): 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) diff --git a/pyromod/listen/message.py b/pyromod/listen/message.py index 3091ac5..9ea5fd3 100644 --- a/pyromod/listen/message.py +++ b/pyromod/listen/message.py @@ -22,11 +22,11 @@ async def wait_for_click( message_id = getattr(self, "id", getattr(self, "message_id", None)) return await self._client.listen( - listener_type=ListenerTypes.CALLBACK_QUERY, - timeout=timeout, filters=filters, + timeout=timeout, + listener_type=ListenerTypes.CALLBACK_QUERY, unallowed_click_alert=alert, chat_id=self.chat.id, user_id=from_user_id, message_id=message_id, - ) + ) \ No newline at end of file