New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add conversation support #720
base: master
Are you sure you want to change the base?
Conversation
|
when will this be added? |
|
What if the user never responds or the bot is restarted?
|
It will keep waiting but to avoid that situation you can add timeout parameter. reply = message.ask("What is your name?", timeout=60) # wait for 1 minute
client.send_message(chat_id, f"Hello {reply.text}") |
|
filter can also be added |
| parse_mode (``str``, *optional*): | ||
| By default, texts are parsed using both Markdown and HTML styles. | ||
| You can combine both syntaxes together. | ||
| Pass "markdown" or "md" to enable Markdown-style parsing only. | ||
| Pass "html" to enable HTML-style parsing only. | ||
| Pass None to completely disable style parsing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| parse_mode (``str``, *optional*): | |
| By default, texts are parsed using both Markdown and HTML styles. | |
| You can combine both syntaxes together. | |
| Pass "markdown" or "md" to enable Markdown-style parsing only. | |
| Pass "html" to enable HTML-style parsing only. | |
| Pass None to completely disable style parsing. | |
| parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*): | |
| By default, texts are parsed using both Markdown and HTML styles. | |
| You can combine both syntaxes together. |
| self, | ||
| text: str, | ||
| quote: bool = None, | ||
| parse_mode: Optional[str] = object, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| parse_mode: Optional[str] = object, | |
| parse_mode: Optional["enums.ParseMode"] = None, |
| quote = self.chat.type != "private" | ||
|
|
||
| if reply_to_message_id is None and quote: | ||
| reply_to_message_id = self.message_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| reply_to_message_id = self.message_id | |
| reply_to_message_id = self.id |
Many developers looking for conversation support in Pyrogram. For that these 3 methods are implemented. (Credit: pyromod)
If this pull request need some improvements, let me know I will improve it or you can make pull request for same.