Skip to content

Added methods to quickly reply to a message with Markdown or HTML #725

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

Closed
wants to merge 1 commit into from

Conversation

JosXa
Copy link
Contributor

@JosXa JosXa commented Jul 17, 2017

No description provided.

@JosXa JosXa requested a review from jh0ker July 17, 2017 15:34
@@ -305,6 +306,40 @@ def reply_text(self, *args, **kwargs):
self._quote(kwargs)
return self.bot.send_message(self.chat_id, *args, **kwargs)

def reply_markdown(self, *args, **kwargs):
"""
Shortcut for ``bot.sendMessage(update.message.chat_id, parse_mode=ParseMode.MARKDOWN, *args, **kwargs)``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to:

Shortcut for::

<two time indent>bot.sendMessage(update.message.chat_id, parse_mode=ParseMode.MARKDOWN, *args, **kwargs)

Shortcut for ``bot.sendMessage(update.message.chat_id, parse_mode=ParseMode.MARKDOWN, *args, **kwargs)``
Sends a message with markdown formatting.

Keyword Args:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Args: (without keyword)


Keyword Args:
quote (Optional[bool]): If set to ``True``, the message is sent as an actual reply to
this message. If ``reply_to_message_id`` is passed in ``kwargs``, this parameter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent continuing line with two indents.

Copy link
Member

@Eldinnie Eldinnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some comments in the code regarding docstrings.

@Eldinnie Eldinnie self-assigned this Jul 19, 2017
@Eldinnie Eldinnie added the 📋 pending-reply work status: pending-reply label Jul 19, 2017
@rahiel
Copy link
Contributor

rahiel commented Jul 19, 2017

Could you change bot.sendMessage to bot.send_message, and bot.editMessageText to bot.edit_message_text in the docstrings? We prefer snake_case method names now.

@JosXa
Copy link
Contributor Author

JosXa commented Sep 11, 2017

Closed by #827.

@JosXa JosXa closed this Sep 11, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2020
@Bibo-Joshi Bibo-Joshi deleted the reply-text-markdown branch November 23, 2020 08:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📋 pending-reply work status: pending-reply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy